W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2011

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 22 Dec 2011 18:14:25 -0500
Message-ID: <4EF3B9D1.9000206@mit.edu>
To: www-dom@w3.org
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:08 GMT