This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
http://dom.spec.whatwg.org/#mutation-observers See bug 22296. Mutation observers should now queue a "compound microtask", and each time they call a callback, they should "execute a compound microtask subtask" to run the steps that invoke the callback. (This microtask might end up interrupted and queued on the main event loop, letting the compound microtask immediately continue.)
*** Bug 24725 has been marked as a duplicate of this bug. ***
I'm not sure I'm fully following the new world order. http://dom.spec.whatwg.org/#concept-mo-invoke is all I have right now. It seems the substeps of step 2 can be wrapped in a "execute a compound microtask subtask" to do those steps. I guess each time a mutation record is added to a record queue I could check a global flag to see if a compound microtask is already queued and if not, add a compound microtask to the queue that'll invoke "concept-mo-invoke" and add a step 4 to "concept-mo-invoke" to clear this new flag, but I'm not a 100% sure that will do the right thing.
That's close to what blink actually does, except that clearing the flag is step 0, rather than step 4, and step 3 just goes away.
I see. 3 goes away because at that point you'd have a new compound microtask scheduled. Okay, I think I got it now. I will fix this tomorrow hopefully.
https://github.com/whatwg/dom/commit/d8b0057ca0dabb961d9d8435fba5e0b5544946d8 Back to you, Ian.
<annevk> scripting environment is no longer a thing DOM has now or needs HTML to define so you can remove that <annevk> and under microtask checkpoint there's a bit of cleanup you can do
r8577 http://html5.org/r/8577