CSS.supports() and @supports should return false for unrecognized selectors in per CSSWG resolution in https://github.com/w3c/csswg-drafts/issues/7280 For why this matters for jQuery, see this comment: https://github.com/w3c/csswg-drafts/issues/7676#issuecomment-1235714917 and that whole issue in general. tl;dr is that jQuery has custom selector extensions but for performance reasons it first tries to run a provided selector through `querySelectorAll` and only when that fails it uses its own custom DOM traversal. However, this approach doesn't work for pseudo-classes using forgiving selector lists as parameters - like `:has()`. jQuery would like to migrate to testing the selector via `CSS.supports("selector(...)")` instead but right now it returns `true` for `:has(:gibberish)` as well. The linked CSS WG resolution makes the API return `false` in such cases, making it a viable tool for jQuery. Chromium bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1359396 Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1789248
Already fixed in Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1789248 And in Chrome https://bugs.chromium.org/p/chromium/issues/detail?id=1359396
<rdar://problem/99682164>
Created attachment 462332 [details] Patch
Committed 254489@main (fc2b16c5035f): <https://commits.webkit.org/254489@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 462332 [details].