What's new in the latest release?

jQuery 3.4 arrives with nonce and nomodule support

Eirini-Eleni Papadopoulou
© Shutterstock / Imagentle  

Last year, our readers stated that jQuery is still very much alive and relevant and the jQuery team proves it with a new release! Here, we have a look at the new features and improvements in jQuery 3.4.

Last year, we heard some opinions on how jQuery is old and irrelevant, how it makes your website unnecessarily slow and how various companies, including GitHub, have documented their decision to decouple from jQuery.

But we also saw that there are those who still believe jQuery has a lot to offer. So, we decided to settle the discussion once and for all and we launched a poll!

The vast majority of the respondents has spoken: jQuery is still very much relevant and the jQuery team proves it with a new release!

jQuery 3.4 was released just yesterday and according to the official blog post, this will be the last minor release in the 3.x branch.

Let’s have a closer look at the features and improvements in 3.4.

What’s new in jQuery 3.4?

Performance improvement in .width and .height There were certain cases where getting and setting dimensions could cause layout thrashing, which means that the browser calculated layout more times than necessary. This issue is now fixed in all browsers except IE, where it can’t be avoided.

nonce and nomodule support – During the process of appending new script tags to load and execute the remote content, attributes such as nonce and nomodule were ignored. In jQuery 3.4 that is no longer the case.

Radio elements: expected state in event handlers – The same issue checkboxes has already been fixed. However, radio inputs we accidentally left out.

Minor vulnerability fix: Object.prototype pollution – This release includes a fix for some unintended behavior when using jQuery.extend(true, {}, ...). More precisely, if an unsanitized source object contained an enumerable __proto__ property, it could extend the native Object.prototype. For previous jQuery versions, you can find the patch diffs for this issue here.

Deprecating positional selectors and deprecating Sizzle – With many native selector APIs as well as native JavaScript and CSS selectors having made their way into modern browsers, it’s about time to deprecate Sizzle.  But in order to remove Sizzle in jQuery 4.0, the so-called positional selectors, which are non-standard selectors, also need to be removed. which are non-standard. Namely, the following selectors get deprecated with jQuery 3.4: :first:last:eq:even:odd:lt:gt, and :nth.

To find out more information on these changes, check out jQuery’s GitHub changelog.

SEE ALSO: Devs have spoken – jQuery is here to stay!

Getting started

Upgrading to jQuery 3.4 from any 3.0+ version should be smooth sailing. However, please keep in mind that if you haven’t yet upgraded to jQuery 3+ you should have a look at the 3.0 Upgrade Guide.

Find out more information on how to download jQuery 3.4 here.

Eirini-Eleni Papadopoulou
Eirini-Eleni Papadopoulou was the editor for Coming from an academic background in East Asian Studies, she decided that it was time to go back to her high-school hobby that was computer science and she dived into the development world. Other hobbies include esports and League of Legends, although she never managed to escape elo hell (yet), and she is a guest writer/analyst for competitive LoL at TGH.

1 Comment
Inline Feedbacks
View all comments
John Krisfalusci
John Krisfalusci
3 years ago

Positional is deprecated in 3.4?! NooOooOooOooooooOoo… =(