importmaps break if extension inserts module script at document_start timing
Categories
(Core :: JavaScript Engine, defect, P3)
Tracking
()
People
(Reporter: mariano, Unassigned)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:152.0) Gecko/20100101 Firefox/152.0
Steps to reproduce:
visited a website that uses importmaps like https://marianoguerra.github.io/tutuca/ with the immutablejs extension [1]
[1] https://immutable-js.com/browser-extension/
Actual results:
The interactive content failed to load with error:
"Import maps are not allowed after a module load or preload has started."
Expected results:
the page should have loaded, the page itself doesn't include any script before the import map, the extension does, here: https://github.com/immutable-js/immutable-devtools/blob/3bd80e851f51a1b78a860c1e6e47c69e400b268f/packages/extension/extension/content-script.js#L13
Comment 1•6 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'WebExtensions::Untriaged' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•6 months ago
|
||
The extension inserts a script element with type="module" at document_start timing, which is before the content's importmap is processed.
It breaks the requirement before the https://github.com/whatwg/html/pull/10528 change.
Bug 1916277 implemented the new behavior behind the dom.multiple_import_maps.enabled pref.
The pref is going to be flipped in bug 2021012.
Updated•6 months ago
|
Updated•6 months ago
|
Description
•