CoreLibs icon indicating copy to clipboard operation
CoreLibs copied to clipboard

Add mobile browsers to the list of user agents, which support `:has()` natively

Open AdamWr opened this issue 1 year ago • 0 comments

Related to - https://github.com/AdguardTeam/CoreLibs/issues/1840 and https://github.com/AdguardTeam/CoreLibs/issues/1683, but for mobile browsers.

It seems that currently in mobile browsers (the same on desktop in mobile view) rules with :has() use ExtendedCSS instead of native :has().

Steps to reproduce

  1. Add this rule:
example.org##div:has(a)
  1. Go to - https://example.org/
  2. Open devtools and search for div

In desktop view native :has() is used.

Screenshot desktop

image

In mobile view ExtendedCSS is used.

Screenshot mobile

image

The same occurs on real Android device.

Screenshot Android

image

AdGuard for Windows 7.17.0 nightly 20 (4637) (CL 1.14.25, DL 2.5.4 ) AdGuard for Android v4.4 Nightly 35

AdamWr avatar Mar 11 '24 10:03 AdamWr