3 ms·
Was discussing this with Christian Heilmann on Twitter who suggested I file this as a bug. There's so much talk about Vanilla.JS and querySelector() / querySel
by nailer 14y ago
Was discussing this with Christian Heilmann on Twitter who suggested I file this as a bug.
There's so much talk about Vanilla.JS and querySelector() / querySelectorAll() obviating the need for selector libraries.
But the first thing any developer inevitably does is create a shortcut to allow them to iterate over the NodeLists these new methods return.
Browsers providing NodeList.Prototype.forEach() would be great way to pave a cowpath.
(technically NodeList doesn't inherit from Array, but there's nothing stopping them from using the same code as a mixin).
Hopefully KHTML/WebKit/Blink and Trident will follow suit.