[whatwg] HTML 5 : Misconceptions Documented

On Wed, Jul 30, 2008 at 8:33 AM, Garrett Smith wrote:
>
> (3) There is no specification for a special [[Get]] for the "elements"
> HTMLCollection as a shortcut to "namedItem", either (though this would not
> seem to be a problem,

Actually, there is:
http://www.w3.org/TR/html5/dom.html#htmlcollection
and I believe the "elements" property of HTMLFormElement is actually
an HTMLFormControlsCollection:
http://www.w3.org/TR/html5/dom.html#htmlformcontrolscollection

> and all implementations have supported this behavior for quite a long time).

Note that all implementations also supports the same behavior on
HTMLFormElement and HTMLDocument.

Otherwise, FWIW, I'm OK with what you're saying about the use of
with(...){...} (useless and generally considered bad practice) and
calling a collection "array".

-- 
Thomas Broyer

Received on Monday, 4 August 2008 15:17:39 UTC