Re: [csswg-drafts] [selectors] The forgiving nature of :has breaks jQuery when used with a complex :has selector (#7676)

@tabatkins 
> jQuery users putting jQuery-specific selectors into an `:is()` will similarly bypass the current check and stick with the browser's selector behavior

Because the jQuery selector engine currently works via a binary switch - first, check qSA; if it throws, use the jQuery custom traversal - and because jQuery never implemented `:is()`, the behavior change is only that before `:is()` got implemented a selector like `:is(div:contains("Foo"))` would throw and once `:is()` got implemented it started returning `0` results. So there's a change but one unlikely to cause a breakage, contrary to the `:has()` situation.

Does Google have any way to collect metrics of how often `:has` is used with jQuery-specific pseudos like `:contains`? That would help a lot.

-- 
GitHub Notification of comment by mgol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7676#issuecomment-1235957347 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 2 September 2022 22:52:08 UTC