Skip to content

Commit

Permalink
Also remove text node in :remove() operator
Browse files Browse the repository at this point in the history
Related discussion:
- gorhill/uBO-Extra#119 (comment)

As an incidental side effect, this may or may not
prevent execution of the content of some inline
script tags.

Co-authored-by:  gorhill <[email protected]>
  • Loading branch information
hawkeye116477 and gorhill committed Jul 17, 2020
1 parent 29404d0 commit 1fc3136
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/js/contentscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,7 @@ vAPI.DOMFilterer = (function() {

removeNodes(nodes) {
for ( let node of nodes ) {
node.textContent = '';
node.remove();
}
},
Expand Down

0 comments on commit 1fc3136

Please sign in to comment.