ExtendedCss icon indicating copy to clipboard operation
ExtendedCss copied to clipboard

Fix ':has()' pseudo-class due to <forgiving-relative-selector-list>

Open slavaleleka opened this issue 3 years ago • 2 comments

native :has() pseudo-class takes <forgiving-relative-selector-list> https://www.w3.org/TR/selectors-4/#has-pseudo

but in v2.0 it seems to take <selector-list> which means that all of selectors in the selector list arg are being matched https://uploads.adguard.org/slbdzdrvx7z36.png

native implementation also does not signal an error on invalid selector in the list arg https://uploads.adguard.org/slbdzdrve42fv.png

slavaleleka avatar Dec 20 '22 13:12 slavaleleka

Related issue - if rules like those:

example.org#?#div[data*="\\""]:has(> qwerty)
example.org#?#div:has(> h1)

are added (I guess the first one is incorrect, though document.querySelectorAll('div[data*="\\""]:has(> qwerty)') doesn't throw error), then the second one doesn't work.

Screenshot

image

Order is important, if I firstly add example.org#?#div:has(> h1) then this one rule works fine, but there are still errors in console and it looks like that every rule below a problematic rule don't work.

AdamWr avatar Dec 22 '22 11:12 AdamWr

Same type of issue #159.

XX-J avatar Apr 15 '23 17:04 XX-J