Look Who is Back: jQuery 4.0.0 is Coming to Town
/ jQuery 4.0.0 has been eagerly anticipated, and it’s now ready for a beta release! Let’s dive into what you can expect from this new version!
Query is a JavaScript library designed to simplify manipulating HTML documents, event handling, and animations. Released in 2006 by John Resig, it aimed to address the inconsistencies and inefficiencies of browser-specific JavaScript across different platforms. jQuery provided a unified way to interact with and modify web pages, making developer lives easier and web development more consistent.
Its success stemmed from its ease of use, concise syntax, and powerful plugins. Developers could achieve complex tasks with less code, leading to faster development and broader adoption. While other libraries have challenged its dominance in recent years, jQuery remains a widely used and valuable tool for front-end web development.
What you can expect from this new version?
Goodbye IE<11: jQuery 4.0.0 drops support for Internet Explorer (IE) 10 and older. While IE 11 support remains for now, the team plans to remove it in stages, with the next step likely in jQuery 5.0. This move results in a size reduction of 867 gzipped bytes! Other old browsers like Edge Legacy, iOS <11, Firefox <65, and Android Browser are also no longer supported.
Deprecated APIs Removed: Several functions that have been deprecated over multiple versions are finally removed. These functions were either meant to be internal or now have native equivalents in all supported browsers. The removed functions include:
jQuery.cssNumber jQuery.cssProps jQuery.isArray jQuery.parseJSON jQuery.nodeName jQuery.isFunction jQuery.isWindow jQuery.camelCase jQuery.type jQuery.now jQuery.isNumeric jQuery.trim jQuery.fx.interval
Push, Sort, and Splice Removed: The jQuery prototype previously had Array methods (push, sort, and splice) that behaved differently from other jQuery methods. These methods were always meant for internal use only. In jQuery 4.0.0, these have been switched to Array functions instead.
Focusin and Focusout Event Order: Browsers have finally agreed on the order of focus and blur events (including focusin, focusout, focus, and blur). All supported browsers in jQuery 4.0.0 now follow a common event order.
Remember, this is just the beta release, and a comprehensive upgrade guide will be available before the final release. Feel free to try it out and provide feedback! You can find the beta release on the official CDN or via npm.