Interface TreeWalker
currentNode: Node;
filter: NodeFilter | null;
root: Node;
whatToShow: number;
firstChild(): Node | null;
lastChild(): Node | null;
nextNode(): Node | null;
nextSibling(): Node | null;
parentNode(): Node | null;
previousNode(): Node | null;
previousSibling(): Node | null;
}
Index
Properties
Methods
Properties
currentNode
The TreeWalker.currentNode property represents the A Node.
Readonlyfilter
The TreeWalker.filter read-only property returns the NodeFilter associated with the TreeWalker.
Readonlyroot
The TreeWalker.root read-only property returns the root Node that the TreeWalker traverses.
ReadonlywhatToShow
The TreeWalker.whatToShow read-only property returns a bitmask that indicates the types of nodes to show.
Methods
firstChild
The
TreeWalker.firstChild()method moves the current the found child.Returns Node | null
lastChild
The
TreeWalker.lastChild()method moves the current the found child.Returns Node | null
nextNode
The
TreeWalker.nextNode()method moves the current the found node.Returns Node | null
nextSibling
The
TreeWalker.nextSibling()method moves the current is no such node, it returnsnulland the current node is not changed.Returns Node | null
parentNode
The
TreeWalker.parentNode()method moves the current and returns the found node.Returns Node | null
previousNode
The
TreeWalker.previousNode()method moves the current returns the found node.Returns Node | null
previousSibling
The
TreeWalker.previousSibling()method moves the current there is no such node, it returnsnulland the current node is not changed.Returns Node | null
The
TreeWalkerobject represents the nodes of a document subtree and a position within them.MDN Reference