[Webkit-unassigned] [Bug 56706] New: DOMNodeRemovedFromDocument (capture phase) not fired for innerHTML update

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 18 23:26:44 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=56706

           Summary: DOMNodeRemovedFromDocument (capture phase) not fired
                    for innerHTML update
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh Intel
               URL: http://lucassmith.name/pub/browser_bugs/wk/domnoderemo
                    vedfromdocument_bug.html
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P3
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: lsmith at lucassmith.name


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.

-- 
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