[Bug 11963] New: The namedItem(key) method must return the first node in the collection that matches the following requirements: •It is an a, applet, area, embed, form, frame, frameset, iframe, img, or object element with a name attribute equal to key, or, •It is an e

http://www.w3.org/Bugs/Public/show_bug.cgi?id=11963

           Summary: The namedItem(key) method must return the first node
                    in the collection that matches the following
                    requirements: •It is an a, applet, area, embed,
                    form, frame, frameset, iframe, img, or object element
                    with a name attribute equal to key, or, •It is an e
           Product: HTML WG
           Version: unspecified
          Platform: Other
               URL: http://www.whatwg.org/specs/web-apps/current-work/#top
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P3
         Component: HTML5 spec (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: contributor@whatwg.org
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org


Specification: http://dev.w3.org/html5/spec/Overview.html
Section: http://www.whatwg.org/specs/web-apps/current-work/#top

Comment:
The namedItem(key) method must return the first node in the collection that
matches the following requirements:
•It is an a, applet, area, embed, form, frame, frameset, iframe, img, or
object element with a name attribute equal to key, or,
•It is an element with an ID equal to key.

This could be a potential problem. All elements can have an ID attribute. What
if you have an element with an ID attribute with the value "foo" which is part
of a collection and you have another element (from the list of applicable
elements) that has a name attribute with a value "foo" which is also a member
of the same collection. Which element is returned? Or is an array or another
collection of elements returned that contains all elements that have a name
attribute with the value "foo" and the element with the attribute ID with the
value "foo"?

Posted from: 71.224.184.28

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Received on Wednesday, 2 February 2011 15:52:45 UTC