[Webkit-unassigned] [Bug 55666] DOMNodeRemoved events are not dispatched

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 4 00:17:30 PST 2011


--- Comment #7 from Ryosuke Niwa <rniwa at webkit.org>  2011-03-04 00:17:29 PST ---
(In reply to comment #5)
> Strange, according to the http://www.w3.org/TR/DOM-Level-3-Events/#event-type-DOMNodeRemoved - "This event must be dispatched before the removal takes place." Is this a wrong place to look at, or we just don't care about the standards? :)

This is a willful violation of the spec.  Also note that DOM Level 3 deprecates the use of DOM mutation events entirely.

> I am more than happy to use a workaround using DOMSubtreeModified, but I failed to find one... Can you give me a good recipe how to use it, so that I should not miss DOMNodeRemoved events? If I remember correctly, I was not able to determine the particular DOM node that was removed from a subtree. Seems like there is no way now to catch the removed DOM node directly from the event?!

Ah, DOMSubtreeModified might not be a good alternative.  Try attaching an event listener for DOMNodeRemoved to every child node.  Then the event will fire for each node after the node has been removed.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list