Traverses the specified document subtree.
Platform Support
IE | Mozilla | Netscape | Opera | Safari | no | 1.0+ | 7.0+ | 9.0+ | no |
---|
Constructors
Constructor | Action | IE | Mozilla | Netscape | Opera | Safari | ||
---|---|---|---|---|---|---|---|---|
TreeWalker Constructor() : TreeWalker
Traverses the specified document subtree.
|
Show Details | no | 1.0+ | 7.0+ | 9.0+ | no | ||
TreeWalker() : TreeWalkerTraverses the specified document subtree. Returns
|
Properties
Property | Action | IE | Mozilla | Netscape | Opera | Safari |
---|---|---|---|---|---|---|
currentNode
: Node
Current node position of the TreeWalker.
|
Show Details | no | 1.0+ | 7.0+ | 9.0+ | no |
|
||||||
expandEntityReferences
: Boolean
If true, indicates that the TreeWalker expands the entity references it encounters while traversing the document.
|
Show Details | no | 1.0+ | 7.0+ | 9.0+ | no |
|
||||||
filter
: NodeFilter
Filter used to filter nodes for traversal.
|
Show Details | no | 1.0+ | 7.0+ | 9.0+ | no |
|
||||||
root
: Node
Specifies the node that the TreeWalker begins traversal at.
|
Show Details | no | 1.0+ | 7.0+ | 9.0+ | no |
|
||||||
whatToShow
: Number
Specifies which Document nodes the TreeWalker will use in its traversal.
|
Show Details | no | 1.0+ | 7.0+ | 9.0+ | no |
|
Functions
Method | Action | IE | Mozilla | Netscape | Opera | Safari | ||
---|---|---|---|---|---|---|---|---|
static firstChild() : Node
Returns first child node of the current node.
|
Show Details | no | 1.0+ | 7.0+ | 9.0+ | no | ||
Returns
|
||||||||
static lastChild() : Node
Returns the last child node of the current node.
|
Show Details | no | 1.0+ | 7.0+ | 9.0+ | no | ||
Returns
|
||||||||
static nextNode() : Node
Returns the next node in the document subtree.
|
Show Details | no | 1.0+ | 7.0+ | 9.0+ | no | ||
Returns
|
||||||||
static nextSibling() : Node
Returns the next sibling node of the current node.
|
Show Details | no | 1.0+ | 7.0+ | 9.0+ | no | ||
Returns
|
||||||||
static parentNode() : Node
Returns the parent node of the current node.
|
Show Details | no | 1.0+ | 7.0+ | 9.0+ | no | ||
Returns
|
||||||||
static previousNode() : Node
Returns the previous node in the document subtree.
|
Show Details | no | 1.0+ | 7.0+ | 9.0+ | no | ||
Returns
|
||||||||
static previousSibling() : Node
Returns the previous sibling of the current node.
|
Show Details | no | 1.0+ | 7.0+ | 9.0+ | no | ||
Returns
|
References
Availability
HTML DOM Level 2|W3C