Re: [DOM4] NodeList should be deprecated

Cameron McCormack: > It is probably not feasible to add to 
HTMLCollection, because it has a
> named property getter which is not [OverrideBuiltins].  That means that
> all the new properties on the prototype like "concat", "push", etc.
> would begin to shadow any named elements on the collection.

On the other hand it would be great to be able to do things like:

   document.getElementsByTagName("span")
           .map(function(x) { return x.clientWidth });

:(

I am a bit reluctant to special case the visibility of named properties 
on HTMLCollection to be something other than the current 
[OverrideBuiltins] or non-[OverrideBuiltins] behaviour.

Received on Saturday, 17 March 2012 02:31:50 UTC