<p>
<span>Test span</span>
Text
</p>
More text
const removeAllTextNodes = () => {
const treeWalker = document.createTreeWalker( document.body, NodeFilter.SHOW_TEXT);
let currentNode = treeWalker.currentNode;
while(currentNode) {
currentNode.remove();
currentNode = treeWalker.nextNode();
}
}
setTimeout(removeAllTextNodes, 1000);
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.