Opened 19 months ago

Last modified 5 weeks 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 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 (5)

comment:1 Changed 19 months ago by greiner

  • Blocking 2360 added

comment:2 Changed 19 months ago by mapx

  • Cc Lain_13 mapx added

comment:3 Changed 10 months 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 4 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 5 weeks ago by sergz

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