JQuery 3.6.2 Updates Handling Of Chrome Selectors
Written by Ian Elliot   
Thursday, 22 December 2022

An updated version of JQuery has been released to enable the correct handling of the recently introduced selectors in Chrome.

JQuery is a fast, small, and feature-rich JavaScript library designed to make things like HTML document traversal and manipulation, event handling and animation simpler with an easy-to-use API that works across most browsers.  jQuery has long been about ironing out the differences between browsers and providing a powerful toolkit of functions that get the job done more simply.

jquery3

The main reason behind the updated release of JQuery was to fully meet the changes experienced when Chrome recently introduced some new selectors, in particular :has(), which the JQuery team describes as a welcome addition, but because of a change to the use of “forgiving parsing”, one that could be problematic because even if the arguments for :has() were invalid, the browser returned no results instead of throwing an error. Because Sizzle relied on such errors to know when to trust native querySelectorAll, selectors that used to work were broken in all jQuery versions.

While the Chrome team implemented a workaround to fix previous jQuery versions, the updated version of jQuery now ensures that any forgiving parsing doesn’t break future jQuery versions, even if previous jQuery versions would still be affected.

The JQuery team took the opportunity to slot in another couple of minor improvements, the first of which revolves around undefined and whitespace-only CSS variables. This is a fix for a problem caused because if in jQuery 3.6.1 you attempt to retrieve a value for a custom CSS property that doesn't exist, JQuery throws an error instead of returning undefined. This has been fixed in 3.6.2. As a related matter, the developers have also made sure that whitespace-only values return the same thing across all browsers.

JQuery 3.6.2 is available now.

jquery3

More Information

JQuery Website

Related Articles

GOV.UK Drops jQuery

GitHub Removes jQuery. Why?

jQuery 3.2.1 Is Out - Do We Still Care?

Just jQuery The Core UI - The JQuery Object

jQuery 3.0 Final Released

JQuery Ever More Popular

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Firefox 1.0 Released 20 Years Ago
10/11/2024

A news item with the headline "Firefox browser takes on Microsoft" from 20 years ago has attracted renewed attention. It was originally published on the BBC News website on November 9th, 2004 rec [ ... ]



Ai-Da's Portrait of Alan Turing At Auction
01/11/2024

Sotheby's Digital Art Day Action, now underway, features a large-scale portrait of  Alan Turing created by Ai-Da, the humanoid robot artist whose work, including this canvas, was exhibited at the [ ... ]


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info

<ASIN:1871962501>

<ASIN:1871962528>