Re: Move length property to the set of supported property indicies?

On 5/20/11 6:17 PM, David Flanagan wrote:
> My experience is implementing NodeList in pure JavaScript (using
> Proxy.create()). The Proxy object knows the length of the list and could
> return it. But if it has to allow the NodeList.prototype.length getter
> function to return the value the implementation becomes more complex and
> requires a WeakMap in addition to the Proxy object.

One other note... Why is this an issue for length but not, say, item()?

-Boris

Received on Friday, 20 May 2011 22:34:02 UTC