WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
56706
DOMNodeRemovedFromDocument (capture phase) not fired for innerHTML update
https://bugs.webkit.org/show_bug.cgi?id=56706
Summary
DOMNodeRemovedFromDocument (capture phase) not fired for innerHTML update
Luke Smith
Reported
2011-03-18 23:26:44 PDT
Capture phase subscribers to DOMNodeRemovedFromDocument are executed for each descendant node that is removed, including text nodes, in most cases. The one case that I have found where this is not true is when an element contains only text (I didn't test an element containing exclusively multiple text nodes). Given the markup below: <p>This will not trigger the callback</p> <p>But this <em>will</em></p> A capture phase subscriber on each p for DOMNodeRemovedFromDocument should fire when that paragraph element's innerHTML is assigned. This is only true for the second paragraph. However, calling replaceChild(document.createTextNode('new text'), firstChild) will trigger the callback for the first paragraph. Opera 11 implements this event and executes the callback consistently for innerHTML assignments regardless of the presence of child elements.
Attachments
Add attachment
proposed patch, testcase, etc.
Luke Smith
Comment 1
2011-03-18 23:27:49 PDT
Simplified repro case at the url provided.
Anne van Kesteren
Comment 2
2023-12-29 02:55:01 PST
We're not interested in improving mutation events.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug