[Webkit-unassigned] [Bug 118139] New: NodeList allows element IDs to override standard DOM accessor

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 27 08:32:46 PDT 2013


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

           Summary: NodeList allows element IDs to override standard DOM
                    accessor
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: chris at improbable.org


As per DOM 1-3, NodeLists are accessed by index using the item() method. As tested in Safari and Chrome, the WebKit browsers have an undocumented feature which also allows property-style access based on the element IDs which would be a minor curiosity except that it breaks the item() accessor if the NodeList happens to contain element with the ID "item".

This test page shows that this behaviour is specific to Chrome and Safari; Firefox and IE8-10 follow the standard behaviour:

http://jsbin.com/ihofev/2/

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