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 18784 - HTMLCollection.item(DOMString)
Summary: HTMLCollection.item(DOMString)
Status: RESOLVED INVALID
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: DOM (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Anne
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-05 20:32 UTC by Ian 'Hixie' Hickson
Modified: 2012-09-23 01:05 UTC (History)
4 users (show)

See Also:


Attachments

Description Ian 'Hixie' Hickson 2012-09-05 20:32:28 UTC
Turns out all browsers have an HTMLCollection.item(DOMString) overload that just defers to the namedItem() method on the object. (That is, not HTMLCollection.namedItem(), but whatever the namedItem() is on the current collection.)
Comment 2 Ms2ger 2012-09-06 06:44:14 UTC
That's true for document.all, and I believe it used to be true for Chrome. However, <http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1741> shows that Firefox/Chrome/Opera follow the spec; i.e. call ToUint32('test') == 0, and return the first object in that collection, rather than the one called 'test'.
Comment 3 Ian 'Hixie' Hickson 2012-09-23 01:05:22 UTC
(see bug 18789)