- From: Erik Arvidsson <arv@chromium.org>
- Date: Mon, 26 Apr 2010 10:38:24 -0700
> Rather that trying to make DOM collections feel like arrays, how about just > giving them a toArray() method? ?This makes it clear that a collection is > not an array, but clearly defines a way to obtain an array. ?Clever > implementors might even be able to optimize common uses-cases using some > kind of copy-on-write strategy so that toArray() doesn't involve memory > allocation and copying. That might be better than nothing but why should a NodeList not have a forEach method? It is pretty clear that people want to be able to treat Arguments and NodeList as Arrays. -- erik
Received on Monday, 26 April 2010 10:38:24 UTC