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. 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.
More InformationRelated ArticlesjQuery 3.2.1 Is Out - Do We Still Care? Just jQuery The Core UI - The JQuery Object
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.
Comments
or email your comment to: comments@i-programmer.info <ASIN:1871962501> <ASIN:1871962528> |