Closed
Bug 1180927
Opened 10 years ago
Closed 10 years ago
MutationObserver callbacks should be called before executing defer scritps
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
DUPLICATE
of bug 789315
People
(Reporter: zbraniecki, Assigned: smaug)
Details
Attachments
(2 files)
This doesn't seem to be spec'ed currently (I filled a W3C bug [0]) but if would be nice to follow the implementation of Chrome and Safari here and execute Mutation Observer callbacks before we execute deferred scripts.
That would allow us to prototype API's with shims that rely on Mutation Observer.
[0] https://www.w3.org/Bugs/Public/show_bug.cgi?id=28920
Reporter | ||
Comment 1•10 years ago
|
||
Olli, can you help me move this forward? I don't know who to ping in the w3c bug :)
Flags: needinfo?(bugs)
Assignee | ||
Comment 2•10 years ago
|
||
I've pinged Anne at least, who might work on the spec a bit if Hixie isn't available.
Flags: needinfo?(bugs)
Reporter | ||
Comment 3•10 years ago
|
||
This is a minimized testcase of the behavior.
The first script is synchronous and it uses MutationObserver to shim a WebAPI.
The second script is deferred and wants to operate on DOM and wants to assume that any elements that were injected into DOM were already modified by the shim's MutationObserver.
This behavior works well in Safari and Chrome and is non deterministic in Gecko.
Assignee | ||
Comment 4•10 years ago
|
||
I'll change our defer script handling to be more async. I hope it doesn't slow down stuff too much on b2g.
Assignee: nobody → bugs
Assignee | ||
Comment 5•10 years ago
|
||
The original testcase doesn't test defer handling, but inline script handling.
Assignee | ||
Updated•10 years ago
|
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•