Hacker News new | ask | show | jobs
by FuzzyDunlop 4905 days ago
Of course. My main point wasn't the use of querySelector per se, but the ability to access the exact DOM element(s) you need without crazy querying or traversal.

While the DOM API isn't perfect by any means, and jQuery fills that gap really well, there are still times where the OOP nature of the DOM gets you exactly what you want with minimal faff.

The other problem is the relative obscurity of it thanks to jQuery and crowd-sourced DOM documentation (via MDN).

1 comments

yeah, jQuery certainly eclipses everything else. Though I don't know what you mean by obscurity + MDN... it does seem weirdly anaemic for such a big / complex / important piece of the API, but I don't know if I'd call MDN obscure. Or, I hope it isn't, I find it wildly useful.