4 ms·
jQuery helps with browser quirks, though. Search the below file for the string "// Support" to see what I mean. Yes, there are a lot of entries for older browse
by ataylor32 10y ago
jQuery helps with browser quirks, though. Search the below file for the string "// Support" to see what I mean. Yes, there are a lot of entries for older browsers, but there are also a lot of entries for relatively recent browsers too.
https://github.com/jquery/jquery/blob/3.0.0-rc1/dist/jquery.js https://github.com/jquery/jquery/blob/3.0.0-rc1/dist/jquery....
- _RPM 10y agoReading the Jquery source code is fun. It seems like they're doing some really clever stuff there. For example, look at isEmptyObject in the code you linked.
- pvg 10y agoWhat's the particular cleverness in that? It seems it would also fail for objects with non-enumerable properties and properties with ES6 Symbols for names.
- dntrkv 10y agoIt does help with browser quirks, but if you aren't supporting <IE10, then you really don't need it. I've made it a point to pull out jQuery from every project I have. Nowadays, I can test in Chrome as I develop and then test any other browsers at the very end and I rarely have any browser specific bugs. Crazy how far web dev has come.
- hamhamed 10y agoYou do really need it, at least for me. I'd rather write $ sign calls instead of getElementByID or querySelector just to start with. The sizzle library in jQuery is so advanced, that you can't do complex queries on the dom yet with today's browser.
- leshow 10y agothe industry is moving away from direct DOM mutation and towards v-dom, so this isn't an issue for a lot of devs.
- brandoncordell 10y agoThere are small libraries that help with making native DOM operations more jQuery-like. We opted just to write our own since we didn't need a good portion or even the smaller libraries.