Re: toArray() method for array-like DOM list objects

On 12/22/11 6:07 PM, Boris Zbarsky wrote:
> You don't need that. Array.prototype.slice.call(nodelist) works fine,
> because |ToInteger(undefined) === 0|. See ECMA-262 section 15.4.4.10.

Oh, and in SpiderMonkey, you can of course use Array.slice(nodelist). 
Other JS engines don't seem keen on implementing generics on the Array 
object, though.

-Boris

Received on Thursday, 22 December 2011 23:15:06 UTC