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

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

From: Marat Tanalin | tanalin.com <mtanalin@yandex.ru>
Date: Fri, 23 Dec 2011 04:02:35 +0400
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: www-dom@w3.org
Message-Id: <251081324598555@web56.yandex.ru>
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 GMT

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