[whatwg] HTMLCollection and HTMLAllCollection suggestion
pedzsan at gmail.com
Sat Apr 3 18:16:14 PDT 2010
HTMLCollection has a namedItem method that returns either null or one
HTMLAllCollection has a namedItem method that returns either null, one
object, or a collection of objects. 
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.
My suggestion is to have namedItem always return either null or 1
And have namedItems 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the whatwg