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

At least since it uses some function with dummy argument to do something that slice function is not intended to, and that purpose is no-so-clear from the script code. There was also information from jQuery developers (cannot find a link unfortunately) that this method works even slower that manual iterating item-by-item.

toArray() would be much more clear, straightforward, and fast way to achieve exactly converting DOM list to Array.


22.12.2011, 22:35, "Boris Zbarsky" <bzbarsky@MIT.EDU>:
> On 12/22/11 1:19 PM, Marat Tanalin | tanalin.com wrote:
>
>> šFirst way seems to be a hack
>
> Why? šIt's the standard way to convert an array-like object to an actual
> Array in EcmaScript....
>
> -Boris

Received on Thursday, 22 December 2011 18:52:23 UTC