1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-09 12:22:33 +01:00
uBlock/docs/tests
Raymond Hill 72bb700568
Add procedural cosmetic operators remove() and upward()
***

New procedural cosmetic operator: `:remove()`

Related issue:
- https://github.com/gorhill/uBlock/issues/2252

The purpose is to outright remove elements from the
DOM tree. Since `:remove()` is an "action" operator,
it must only be used as a trailing operator (just
like the `:style()` operator).

AdGuard's cosmetic filter syntax `{ remove: true; }`
will be converted to uBO's `:remove()` operator
internally.

***

New procedural cosmetic operator: `:upward(...)`

The purpose is to lookup an ancestor element.

When used with an integer argument, it is synonym of
`:nth-ancestor()`, which will be deprecated and which
will no longer be supported once no longer used in
mainstream filter lists.

Filter lists maintainers must only use `:upward(int)`
instead of `:nth-ancestor(int)` once the new operator
become available in all stable releases of uBO.

`:upward()` can also accept a CSS selector as argument,
in which case the nearest ancestor which matches the
CSS selector will be selected.
2020-03-07 14:25:06 -05:00
..
css-selector-based-cosmetic-filters.html Add procedural cosmetic operators remove() and upward() 2020-03-07 14:25:06 -05:00
hnbigset-benchmark.html fix title 2018-12-08 10:05:45 -05:00
hnset-benchmark.html cosmetic change to pages' header 2018-12-05 14:48:31 -05:00
hntrie-test.html allow navigating back to benchmarks/tests index page 2018-12-04 13:15:45 -05:00
hostname-pool.js jshint-compliance 2018-11-16 08:00:02 -05:00
index.html Add procedural cosmetic operators remove() and upward() 2020-03-07 14:25:06 -05:00
procedural-cosmetic-filters.html Add procedural cosmetic operators remove() and upward() 2020-03-07 14:25:06 -05:00
procedural-html-filters.html Add procedural cosmetic operators remove() and upward() 2020-03-07 14:25:06 -05:00
scriptlet-injection-filters-1.html Fix title in test page 2019-09-15 11:29:39 -04:00