AdguardTeam / AdguardTeam/ExtendedCss

Some rules with ':not(:has())' don't work correctly

Đang mở
#159 7 bình luận 2 reaction 0 người được giao Xem trên GitHub
Priority: P4
Ngôn ngữ chính
TypeScript
Star
71
Fork
11
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Related issue - https://github.com/AdguardTeam/AdguardFilters/issues/140279

Steps to reproduce:
1. Add this rule:
```adblock
example.org#?#div:not(:has(img, input, iframe, h1, p))
```
2. Go to - https://example.org/

Website is blank, but it shouldn't be.

It looks like that `ExtendedCss.query('div:not(:has(img, input, iframe, h1, p))')` returns one `div`, but `document.querySelectorAll('div:not(:has(img, input, iframe, h1, p))')` returns empty `NodeList`.

Screenshot

![image](https://user-images.githubusercontent.com/29142494/212846055-3e50d2d5-21cf-4ee9-bd70-529647e73cd4.png)


By the way, it looks like that even if rule is added without `?`, like this:
```adblock
example.org##div:not(:has(img, input, iframe, h1, p))
```
then it's still treated as an Extended CSS rule, but I think it shouldn't be.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.