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

The fact it's unsupported by other browsers makes it useless, unfortunately. Though tihs syntax would indeed be much more usable than Array.prototype.slice.call().


23.12.2011, 03:14, "Boris Zbarsky" <bzbarsky@MIT.EDU>:
> 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 Friday, 23 December 2011 00:03:08 UTC