1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-01 02:02:29 +02:00

Remove nth-ancestor doc, people disregard the deprecated label and keep using it -- this has to stop

Raymond Hill 2021-03-19 09:05:03 -04:00
parent aa719eee4d
commit 6e87ca5389

@ -126,15 +126,6 @@ Note that if _arg_ is valid CSS selector, uBO will not consider the `:not` opera
Deprecated in favor of [`subject:upward(arg)`](#subjectupwardarg) in [1.25.3b0](https://github.com/gorhill/uBlock/commit/72bb70056843024b1a31fe1ab9c90bd4e8260ba2)
- Description: lookup the nth ancestor relative to the currently selected node.
- Chainable: Yes.
- _subject_: Can be a plain CSS selector, or a procedural cosmetic filter.
- _n_: positive number >= 1 and < 256, distance from the currently selected node.
- Examples:
- Existing filter: `fastbay.org##.detLink:has-text(VPN):xpath(../../..)` can be rewritten as `fastbay.org##.detLink:has-text(VPN):nth-ancestor(3)`
Introduced in uBO [1.18.17rc1](https://github.com/gorhill/uBlock/commit/73e2f25e95b90332a3e53646d83525d14e816d25) to have a low overhead way to accomplish ancestor selection. It is effectively a low-overhead equivalent to `:xpath(..[/..]*)`, as it avoids the need to create and execute [XPath expressions](https://developer.mozilla.org/en-US/docs/Web/XPath).
***
### `subject:upward(arg)`