jQuery 3.6.2 Released with Adjustments for Chrome’s New :has() Selector

jQuery 3.6.2, released four months after version 3.6.1, introduces compatibility fixes for Chrome’s newly added :has() selector, handling forgiving parsing and complex selector scenarios, while ensuring older versions may still be affected and directing users to the full changelog for additional changes.

Laravel Tech Community
Laravel Tech Community
Laravel Tech Community
jQuery 3.6.2 Released with Adjustments for Chrome’s New :has() Selector

Four months after the 3.6.1 release, jQuery 3.6.2 has been published, driven by Chrome’s introduction of new selectors.

Chrome recently added several new selectors, the most impactful being :has(). This popular addition is welcomed by the jQuery team, but the specification change means :has() now uses “forgiving parsing”; even if its argument is invalid, the browser returns no results instead of throwing an error.

Problems arise when :has() contains another jQuery selector extension, such as :has(:contains("Item")), or nests itself like :has(div:has(a)). Sizzle relies on such failures to decide when to trust the native querySelectorAll and when to run selectors through Sizzle.

The Chrome team implemented a workaround that fixes most cases for earlier jQuery versions. jQuery has also taken measures to ensure that forgiving parsing will not break future jQuery releases, although older versions may still be affected.

For other changes and fixes, see the official release announcement.

jQuery is a fast, small, and feature‑rich JavaScript library that simplifies HTML document traversal and manipulation, event handling, animation, and Ajax through an easy‑to‑use API that works across many browsers, combining versatility and extensibility to change how millions write JavaScript.
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

frontendChrome:has() selectorjQuery3.6.2
Laravel Tech Community
Written by

Laravel Tech Community

Specializing in Laravel development, we continuously publish fresh content and grow alongside the elegant, stable Laravel framework.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.