3 ms·
You are ignoring browsers support. One of the main reasons I suggest using jQuery is browser support. Another solution is to use a transpiler like Bable.
by csomar 9y ago
You are ignoring browsers support. One of the main reasons I suggest using jQuery is browser support. Another solution is to use a transpiler like Bable.
- ctrl-j 9y ago> Another solution is to use a transpiler like Bable. At this point in front-end development something like Babel is a must. If you aren't using Babel/Flow/Typescript in your workflow, you are putting yourself at disadvantage for no good reason. For better or worse, transpiling is a fact of life.
- platz 9y agoIf you're not using a framework that requires you to transpile, jQuery basically takes care of the most common bits.
- loganfsmyth 9y agoBabel on its own only addresses syntactic functionality and wouldn't cover this, but it is indeed extremely easily to polyfill `classList`.
- twhb 9y ago"Five years ago" refers to across-the-board browser support, the spec is older. You can use caniuse.com, https://kangax.github.io/compat-table/es6/ https://kangax.github.io/compat-table/es6/, and/or MDN compatibility tables to quickly check browser support. Browsers are now grinding away at new APIs constantly - don't let your memory of "not safe to use" last more than a year.
- couchand 9y agoIt may be hard to imagine, but even today not every user is running a browser built in the last year.
- hnzix 9y agoCorporate and government SOE machines are often running versions 7+ years out of date. I'm still EOL'ing XP machines for government clients. Seniors are another group who often run, well, senior versions. If your Uber-for-toothpaste startup doesn't care then fine. But crusty old browsers are still a crucial factor in many markets.
- dvfjsdhgfv 9y agoMany companies and developers simply decide this group is insignificant and just don't care.
- twhb 9y agoIf you explore the first of the links you're replying to, you'll see that I make my conclusions about what people are using based on country-adjusted analytics from millions of websites, not imagination. This situation is actually improving too. Chrome's "evergreen" development cycle has made a world of difference to feature adoption rate, and it's spread to every other major browser vendor. Once IE11 dies out, we'll have no non-evergreen browsers over 1% market share, and it makes me so happy to say that.