Bug 18784 - HTMLCollection.item(DOMString)
HTMLCollection.item(DOMString)
Status: RESOLVED INVALID
Product: WebAppsWG
Classification: Unclassified
Component: DOM
unspecified
PC All
: P2 normal
: ---
Assigned To: Anne
public-webapps-bugzilla
:
Depends on:
Blocks:
  Show dependency treegraph
 
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

Note You need to log in before you can comment on or make changes to this bug.
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)