[Bug 16606] MutationObserver doesn't provide a safe way to suspend & resume observation

https://www.w3.org/Bugs/Public/show_bug.cgi?id=16606

--- Comment #14 from Olli Pettay <Olli.Pettay@gmail.com> 2012-04-03 08:39:09 UTC ---
(In reply to comment #13)
> 
> Because writing a re-entrant callback is hard. This is one big issue with the
> existing mutation events. If you make any DOM mutations inside a mutation event
> handler, then you might get called synchronously, and it's really hard to
> reason about.
> 
> > And what has mutation observer callback to do with event loop?
> 
> I thought a mutation observer callback can be called recursively if you start a
> new event loop by e.g. showModalDialog inside the callback itself, and
> observable DOM mutations are made within that event loop. Am I missing /
> misunderstanding something?

Yes, callbacks can be called recursively. But how would deliver() make that
situation any worse?

But sounds like you don't like deliver() too much, and I don't
care whether it is deliver() or takeMutations(), so perhaps we should do the
latter ?

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 3 April 2012 08:39:12 UTC