From 8d3c4916b0a0a32a91a0f5bfd596ee58062c6c2b Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sat, 21 Nov 2020 09:51:14 -0500 Subject: [PATCH] Skip trying to find effective context for `about:srcdoc` frames `about:srcdoc` frames are their own origin, trying to use the origin of the parent context causes an exception to be thrown when accessing location.href. --- src/js/contentscript.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/contentscript.js b/src/js/contentscript.js index 8b02bf0b1..bd0768c1e 100644 --- a/src/js/contentscript.js +++ b/src/js/contentscript.js @@ -116,7 +116,7 @@ vAPI.contentScript = true; try { while ( context !== self.top && - context.location.protocol === 'about:' + context.location.href.startsWith('about:blank') ) { context = context.parent; }