logoalt Hacker News

troupo • today at 9:48 PM • 2 replies • view on HN

No, you're not.

jQuery returned useful collections. DOM methods return an anemic NodeList which doesn't even implement Array interface.


Replies

kuschku • today at 10:09 PM

That's why I do

  $ = (selector) => Array.from(document.querySelectorAll(selector))
Still not as good as the original, but somewhat usable at least :/
➕ show 1 reply
Kuyawa • today at 9:51 PM

  $('body').childNodes.forEach(console.log)
I see a beautiful collection there
➕ show 1 reply