Bugzilla – Bug 18784
Last modified: 2012-09-23 01:05:22 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.)
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'.
(see bug 18789)