Skip to content
Permalink
Browse files
Add new cosmetic procedural operator: :nth-ancestor(n)
The purpose of this new `:nth-ancestor(n)` operator is to
lookup the nth ancestor relative to the currently selected
node.

It is essentially equivalent to `:xpath(..)`, where
ancestor distance is expressed as a number rather than a
sequence of slash-separated `..`.

The rationale to introduce this new procedural selector
is to have a low overhead way to accomplish ancestor
selection.
  • Loading branch information
gorhill authored and hawkeye116477 committed Jun 29, 2020
1 parent d7213bb commit 4dccbfd787ace8b5c8c19a598aaff3711b3aa854
Showing with 228 additions and 180 deletions.
  1. +207 −171 src/js/contentscript.js
  2. +21 −9 src/js/static-ext-filtering.js

0 comments on commit 4dccbfd

Please sign in to comment.