3 ms·
And the Fetch API, has, according to caniuse[1], 76% support. I don't know that I can disregard 1 out of every 4 users, hence, jQuery. For some things, like th
by deathanatos 9y ago
And the Fetch API, has, according to caniuse[1], 76% support. I don't know that I can disregard 1 out of every 4 users, hence, jQuery.
For some things, like those mentioned by twhb, where support is >90%, sure, ditch the library and use the supported stuff. But I don't think all of jQuery is that well supported, yet, and/or has as decent an interface.
[1]: https://caniuse.com/#search=fetch https://caniuse.com/#search=fetch
- josephg 9y agoI suppose. Or just use a polyfill for old browsers. It increases your code size a little, but at least the bloat is temporary. https://github.com/github/fetch https://github.com/github/fetch or https://www.npmjs.com/package/fetch-ie8 https://www.npmjs.com/package/fetch-ie8
- teniutza 9y agoPolyfills are a good option in some cases. I, personally, try to stay away from them as much as possible. Once you add a polyfill (e.g. fetch), you' soon realize that you need another one (e.g. Object.assign) and soon you will have a list of polyfills to take care of. The advantage of jQuery in this regard is that it has all these "polyfills" in one place. I believe that jQuery is not "modular" enough for today's web development environment. The "light" version is a step in the right direction but it's not enough. If one could configure the "modules" needed and download/load a single file/library, it would be tremendous.