Closed jb222 closed 2 weeks ago
I can reproduce the issue...
Should be fixed at 5.3.6209 (crx)
Please download the crx file linked above and drag and drop it to the extensions page chrome://extensions
(after you've enabled 'Developer Mode').
For a quick fix please export your settings and scripts as zip or (JSON) file at the "Utilities" tab and import it back at the fixed BETA version.
Thanks for the quick fix, it's working now as expected.
Only in API mode, the console shows content: DOMContentLoaded
and content: load
twice. Is the event triggered by both parent and child windows?
Is the event triggered by both parent and child windows?
Yes, the "content" script is injected into every frame at the moment. This needs further improvement.
But apparently not in API Dynamic mode. Thanks!
But apparently not in API Dynamic mode.
Ah, I see. Actually in both modes, but in "UserScripts API Dynamic" all script information is present at real document start and therefore all processing is stopped if no script is supposed to run. In "UserScript API" mode the content script has to wait for the background worker to answer and therefore continues processing until the script information arrived.
First off, the new Userscripts API Dynamic mode is amazingly fast. So, to prevent errors, a
DOMContentLoaded
eventlistener was necessary. The userscript logsDOMContentLoaded
even before the content script does! 👍It would be great if we could set the mode per script, e.g. with something like
// @dynamic_mode
.Install the script. Navigate to my test. Open the console. The web page includes a (same-origin) page in the
iframe
.Expected Behavior
The userscript should only work in the parent window, not in the iframe.
Actual Behavior
Unlike
Userscripts API
mode, inUserscripts API Dynamic
mode the<p>
is appended to parent AND child window.Specifications
Script