NodeIterator
Module: JavaScript DOM API
The NodeIterator interface represents an iterator over the members of a list of the nodes in a subtree of the DOM. The nodes will be returned in document order.
#include <NodeIterator.idl>
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| Node | nextNode() |
| Node | previousNode() |
Public Attributes
Section titled “Public Attributes”| Name | |
|---|---|
| readonly attribute Node | root Returns a Node representing the root node as specified when the NodeIterator was created. |
| readonly attribute Node | referenceNode Returns the Node to which the iterator is anchored. |
| readonly attribute boolean | pointerBeforeReferenceNode Returns a Boolean flag that indicates whether the NodeIterator is anchored before, the flag being true, or after, the flag being false, the anchor node. |
| readonly attribute unsigned long | whatToShow Returns an unsigned long being a bitmask made of constants describing the types of Node that must to be presented. |
| readonly attribute NodeFilter | filter Returns a NodeFilter used to select the relevant nodes. |
Public Functions Documentation
Section titled “Public Functions Documentation”function nextNode
Section titled “function nextNode”Node nextNode()Return: the next Node in the document, or null if there are none.
function previousNode
Section titled “function previousNode”Node previousNode()Return: the previous Node in the document, or null if there are none.
Public Attributes Documentation
Section titled “Public Attributes Documentation”variable root
Section titled “variable root”readonly attribute Node root;Returns a Node representing the root node as specified when the NodeIterator was created.
variable referenceNode
Section titled “variable referenceNode”readonly attribute Node referenceNode;Returns the Node to which the iterator is anchored.
variable pointerBeforeReferenceNode
Section titled “variable pointerBeforeReferenceNode”readonly attribute boolean pointerBeforeReferenceNode;Returns a Boolean flag that indicates whether the NodeIterator is anchored before, the flag being true, or after, the flag being false, the anchor node.
variable whatToShow
Section titled “variable whatToShow”readonly attribute unsigned long whatToShow;Returns an unsigned long being a bitmask made of constants describing the types of Node that must to be presented.
variable filter
Section titled “variable filter”readonly attribute NodeFilter filter;Returns a NodeFilter used to select the relevant nodes.
© 2026 Coherent Labs. All rights reserved.