We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bootstrap.js] Handle SVG top document properly
src
*:href
diff --git a/demo/bootstrap.js b/demo/bootstrap.js index 61d9171a..bdd87a9e 100644 --- a/demo/bootstrap.js +++ b/demo/bootstrap.js @@ -14,7 +14,16 @@ else { baseURI = top.hook.parameters.baseURI; } hook.parameters.baseURI = baseURI; - noHookAuthorization = new URL(top.document.querySelector('script').src).searchParams.get('no-hook-authorization'); + let script = top.document.querySelector('script'); + let src = script.src; + if (!src) { + let attr = Array.prototype.filter.call(script.attributes, (a) => a.name.endsWith(':href'))[0]; + if (attr) { + src = attr.value; + } + } + noHookAuthorization = new URL(src, baseURI).searchParams.get('no-hook-authorization'); break; case 'ServiceWorkerGlobalScope': baseURI = new URL(location.origin + new URL(location.href).searchParams.get('service-worker-initiator')).href;
The text was updated successfully, but these errors were encountered:
6e731fb
Top SVG must not be supported as DevTools is enabled
Sorry, something went wrong.
[README] Add Note for Fix #316 Redirect top SVG to about:blank
024e018
e1bd969
No branches or pull requests
[bootstrap.js] Handle SVG top document properly
Root Cause
src
attribute but*:href
to specify the script URLFix
The text was updated successfully, but these errors were encountered: