Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • A adblockpluscore
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 91
    • Issues 91
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Jira
    • Jira
  • Merge requests 10
    • Merge requests 10
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • eyeo
  • adblockplus
  • abc
  • adblockpluscore
  • Issues
  • #240
Closed
Open
Issue created Aug 03, 2020 by Andrea Giammarchi@agiammarchiMaintainer

Allow `hideIfMatchesXPath` to reach non-elements

Background

One feature XPath has over CSS selectors, is that it can reach also text nodes, or any kind of node, within an element.

Currently, due to its hideElement usage, this possibility is taken away, but we should enable it to make this snippet even more powerful.

What to change

Use hideElement(element) only if element.nodeType === Node.ELEMENT_NODE, and remove the node otherwise.

Assignee
Assign to
Time tracking