Interface NodeIterator
filter: NodeFilter | null;
pointerBeforeReferenceNode: boolean;
referenceNode: Node;
root: Node;
whatToShow: number;
detach(): void;
nextNode(): Node | null;
previousNode(): Node | null;
}
Index
Properties
Methods
Properties
Readonlyfilter
The NodeIterator.filter read-only property returns a NodeFilter object, that is an object which implements an acceptNode(node) method, used to screen nodes.
ReadonlypointerBeforeReferenceNode
The NodeIterator.pointerBeforeReferenceNode read-only property returns a boolean flag that indicates whether the NodeFilter is anchored before (if this value is true) or after (if this value is false) the anchor node indicated by the A boolean.
ReadonlyreferenceNode
The NodeIterator.referenceNode read-only property returns the iterator remains anchored to the reference node as specified by this property.
Readonlyroot
The NodeIterator.root read-only property represents the traverses.
ReadonlywhatToShow
The NodeIterator.whatToShow read-only property represents an unsigned integer representing a bitmask signifying what types of nodes should be returned by the NodeIterator.
Methods
detach
nextNode
The
NodeIterator.nextNode()method returns the next node in the set represented by the NodeIterator and advances the position of the iterator within the set.Returns Node | null
previousNode
The
NodeIterator.previousNode()method returns the previous node in the set represented by the NodeIterator and moves the position of the iterator backwards within the set.Returns Node | null
The
NodeIteratorinterface represents an iterator to traverse nodes of a DOM subtree in document order.MDN Reference