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