[whatwg] Why do HTML*Collection's nameItem need to return 5 different objects?

According to
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmlpropertiescollection

*HTMLCollection* returns the first element.
*HTMLAllCollection* returns the first element or another HTMLAllCollection
if there are multiple elements
*HTMLFormControlsCollection* returns the first element or RadioNodeList if
there are multiple elements
*HTMLOptionsCollection* returns the first element or live NodeList if there
are multiple elements
*HTMLPropertiesCollection* returns PropertyNodeList

In particular, I'm puzzled that
HTMLAllCollection, HTMLFormControlsCollection, and HTMLOptionsCollection
all return different objects. Why?

Can those 3 classes somehow return the same object? FWIW, WebKit has always
returned a static node list.

Best,
Ryosuke Niwa
Software Engineer
Google Inc.

Received on Friday, 13 July 2012 20:02:50 UTC