9 ms·
But it doesn't do chaining and you have to loop through elements to do anything with them.
by dsego 2y ago
But it doesn't do chaining and you have to loop through elements to do anything with them.
- Spivak 2y agoI'm always surprised that an API that is defined by matching 0-n dom elements doesn't return a container that by default maps over them list monad style.
- freeone3000 2y agoThere’s a fairly small polyfill that makes a DOMNodeList have the same functions as Array.
- jasonjayr 2y agoAre the various browser JS implementations clever enough not to make a new Object for Array.from(DOMNodeList) ?