Make non-initial about:blank fire document-element-inserted notifications
Categories
(Core :: DOM: Core & HTML, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(1 file)
I need this for bug 1489308 to fix how webextensions interact with about:blank.
Assignee | ||
Comment 1•6 years ago
|
||
The basic idea is to make non-initial about:blank fire
document-element-inserted notifications just like every other document. We
then ensure that there's a notification (initial-document-element-inserted)
that only gets fired once per window for documents that are in a window. This
notification is what webextensions use to inject into the document.
The old setup which injected into about:blank when its global is created gets
removed in favor of injecting the same way as into every other document.
The changes to Document.cpp are fixing a bug in the "block the parser" stuff
webextensions do. For about:blank, the blocking happens at a point when the
parser really has nothing else to parse (since it's parsing the empty string).
So the blocking is a no-op. But we do want to prevent DOMContentLoaded firing,
because otherwise the "end of document" scripts could run before we finish
doing the "beginning of document" work in webextensions. So we want to make
sure we block DOMContentLoaded, not just the load event.
Comment 3•6 years ago
|
||
bugherder |
Comment 4•6 years ago
|
||
Backout requested by igoldan
Backout: https://hg.mozilla.org/mozilla-central/rev/98c743692a8494dbd609abe2f96b8297f777cad6
Assignee | ||
Updated•6 years ago
|
Comment 6•6 years ago
|
||
bugherder |
Comment 7•6 years ago
|
||
bugherder |
Updated•6 years ago
|
Description
•