DOM4 spec says namedItem() should returns the first element with ID or name from the collection.
I observed that Firefox behaves correctly but chrome returns all matching Element objects inside a NodeList object.
Does chrome violate the standard in terms of namedItem() method?
var hc = document.images
hc.length; //3
hc.namedItem("logo"); // 2 images with name="logo"
Object.prototype.toString.call(hc.namedItem("logo"))
Firefox -> "[object HTMLImageElement]"
Chrome -> "[object NodeList]"
Yes, Chrome is violating the standard here.