Bug 123756 - Moving the node while handling DOMNodeRemovedFromDocument can force sending multiple DOMNodeRemovedFromDocument to nodes still in the DOM
Summary: Moving the node while handling DOMNodeRemovedFromDocument can force sending m...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-04 14:25 PST by Alexandru Chiculita
Modified: 2019-02-06 09:19 PST (History)
0 users

See Also:


Attachments
Test case (1.25 KB, text/html)
2013-11-04 14:25 PST, Alexandru Chiculita
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandru Chiculita 2013-11-04 14:25:29 PST
1. Open the attached example.
2. Click Move nodes.
3. Notice how DOMNodeRemovedFromDocument is even for elements that are still part of the DOM.

The code iterates on the children of the removed node. If one of the children is moved while handling its DOMNodeRemovedFromDocument event, the runtime will continue from its new location and send the events to all the nodes using the new location.
Comment 1 Alexandru Chiculita 2013-11-04 14:25:49 PST
Created attachment 215954 [details]
Test case
Comment 2 Lucas Forschler 2019-02-06 09:19:04 PST
Mass move bugs into the DOM component.