Not TestedTesting not done, may not work properly
DOM & HTML

TreeWalker

Traverse nodes of a DOM subtree using specified node types and filter conditions.

Checking support...
Advertisement

Interactive Input Workspace

Ready for input

Web API Execution Output

Result output will be displayed here after processing...

Native JavaScript Code Example (Zero Libraries)

const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT);
while(walker.nextNode()) { console.log(walker.currentNode.tagName); }

About the TreeWalker Web API

TreeWalker object represents the nodes of a document subtree and a position within them.

Specification:W3C & WHATWG Web API Standard
Sponsored Content