3 ms·
> JQuery is one example: a minuscule wrapper around document.querySelectorAll() plus ES6 arrow functions gets you 75% of the way there, without having to unders
by DaiPlusPlus 9y ago
> JQuery is one example: a minuscule wrapper around document.querySelectorAll() plus ES6 arrow functions gets you 75% of the way there, without having to understand how/where JQuery is being "clever" in various event handling corner cases.
jQuery predates querySelectorAll - that's why it's so popular. It sticks around because now it's to JavaScript what Boost is to C++: things that are needed a lot of the time that the official standard library moves too slowly to add themselves. I don't use jQuery myself anymore, but if the DOM added support for "element collections" and if JavaScript added lodash-style functional methods to all collection types (e.g. if `Array.prototype.map/forEach/filter/etc` worked on NodeList) then we'd be fine.
- ep103 9y agoThat was exactly his point.