[Webkit-unassigned] [Bug 98921] New: MutationRecord addedNodes/removedNodes should be null in non and not empty NodeLists

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 10 09:53:15 PDT 2012


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

           Summary: MutationRecord addedNodes/removedNodes should be null
                    in non and not empty NodeLists
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
               URL: http://dom.spec.whatwg.org/#concept-node-insert
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: arv at chromium.org
                CC: rafaelw at chromium.org, adamk at chromium.org


We currently return empty NodeLists for addedNodes/removedNodes in several places where we should return null.

See http://dom.spec.whatwg.org/#concept-node-insert step 7

var div = document.createElement('div');
var observer = new JsMutationObserver(function() {});
observer.observe(div, {
  childList: true
});

var a = document.createTextNode('a');
div.appendChild(a);

var records = observer.takeRecords();
assert(records[0].removedNodes === null);


There is one case of "removedNodes null" in the spec and two cases of "addedNodes null". Searching is your friend.

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