Re:From jQuery to JavaScript and back again
by jackmoore on Friday February 08, 2013 @09:59AM
(#5188133)
Iterating a NodeList isn't so bad:
But, I agree with the point. If the NodeList isn't live, like it is for the other DOM querying methods, then what is the point in returning a NodeList instead of an array?
[ Parent
| on HN ]
Re:From jQuery to JavaScript and back again
by masklinn on Friday February 08, 2013 @10:22AM
(#5188240)
The DOM WebIDL does not know what an array is. Though an IDL extension/annotation added some time ago allows inheriting IDL interfaces from core language objects or interfaces rather than the root object (http://dev.w3.org/2006/webapi/WebIDL/#ArrayClass), and DOM4 adds this annotation to NodeList http://dom.spec.whatwg.org/#interface-nodelist