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

NodeIterator

Iterate sequentially over a filtered list of DOM nodes in document order.

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 iterator = document.createNodeIterator(document.body, NodeFilter.SHOW_TEXT);
let node;
while ((node = iterator.nextNode())) { console.log(node.nodeValue); }

About the NodeIterator Web API

NodeIterator object represents an iterator over a list of nodes in a document subtree in document order.

Specification:W3C & WHATWG Web API Standard
Sponsored Content