<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">HTMLCollection has a namedItem method that returns either null or one object. [1]<div><br></div><div>HTMLAllCollection has a namedItem method that returns either null, one object, or a collection of objects. [2]</div><div><br></div><div>I'm a Rails freak and one of the things that they do which I love is foo returns an item and foos returns a list of items. The unconscious benefit of this I believe is huge.</div><div><br></div><div>My suggestion is to have namedItem always return either null or 1 object.</div><div><br></div><div>And have namedItem<b>s</b> always return a collection. We can debate whether it is better to return null or an empty collection. I prefer the latter myself. Then I can always feed it to an iterator.</div><div><br></div><div>[1] <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#htmlcollection-0">http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#htmlcollection-0</a></div><div>[2] <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#htmlallcollection-0">http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#htmlallcollection-0</a></div></body></html>