[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 #13 from Ryosuke Niwa <rniwa@webkit.org> 2012-04-03 08:35:45 UTC ---
(In reply to comment #12)
> (In reply to comment #11)
> > Right, and I don't think that's a desirable behavior (called again) because now
> > mutation observer callback can be called mutually recursively (with deliver())
> > without starting an event loop.
> 
> Why is that not desirable behavior?

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?

-- 
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:35:53 UTC