This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 9261 - Copying all the attributes would include the "id" attribute. Doesn't this allow multiple duplicate ID attributes? This is what current browsers do, so I guess which element gets selected in this situation by CSS or getElementById should be specified in th
Summary: Copying all the attributes would include the "id" attribute. Doesn't this all...
Status: RESOLVED WORKSFORME
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: LC
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-17 16:33 UTC by contributor
Modified: 2010-10-04 13:59 UTC (History)
5 users (show)

See Also:


Attachments

Description contributor 2010-03-17 16:33:30 UTC
Section: http://www.whatwg.org/specs/web-apps/current-work/#create-an-element-for-the-token

Comment:
Copying all the attributes would include the "id" attribute. Doesn't this
allow multiple duplicate ID attributes? This is what current browsers do, so I
guess which element gets selected in this situation by CSS or getElementById
should be specified in the ID section.

Posted from: 192.187.145.240
Comment 1 Ms2ger 2010-03-17 19:43:07 UTC
Web DOM Core already defines that getElementById returns the first element: <http://simon.html5.org/specs/web-dom-core#dom-document-getelementbyid>. For ID selectors, the Selectors specification implicitly defines that all elements with the given id are matched: <http://www.w3.org/TR/css3-selectors/#id-selectors>.