Opened 3 years ago

Last modified 3 days ago

#3142 new change

Add XPath capabilities to element hiding filters

Reported by: greiner Assignee:
Priority: P5 Milestone:
Module: Core Keywords:
Cc: Lain_13, mapx, sergz, erikvold Blocked By: #2388
Blocking: #2360 Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):



(taken from original description in #2360 about hiding elements by selecting their child elements)

In general XPath is a generic solution for various problems such as selecting an element depending on its children. But XPath filters have similar issues as CSS property filters such as requiring to hide elements manually and to observe the page for changes at runtime. Therefore waiting for #2388 to be closed probably makes the most sense to get the necessary architecture in place first.

See forum post

What to change

  • Allow XPath notation in element hiding filters in a backwards-compatible fashion
  • Disallow generic XPath filters to avoid performance issues
  • Select and hide elements in the content script using document.evaluate()

Change History (6)

comment:1 Changed 3 years ago by greiner

  • Blocking 2360 added

comment:2 Changed 3 years ago by mapx

  • Cc Lain_13 mapx added

comment:3 Changed 2 years ago by fhd

  • Priority changed from Unknown to P5

I think we should try #3143 first, since it'd just be a polyfill for something that'll be possible with vanilla CSS in the near future. So I'm making this one a P5. If it's interesting for reasons beyond solving #2360, feel free to elaborate.

comment:4 Changed 23 months ago by 0acceptable

the functions: matches(), replace() and tokenize() , have inbuilt support for Regular Expressions in XPath 2.0

Will adb support this?

comment:5 Changed 20 months ago by sergz

  • Cc sergz added

comment:6 Changed 3 days ago by erikvold

  • Cc erikvold added
Note: See TracTickets for help on using tickets.