TreeWalker : Object
Return to: HTML DOM Level 2 index

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() : TreeWalker

Traverses the specified document subtree.

Returns
TreeWalker

Visibility
internal

Properties

Property Action IE Mozilla Netscape Opera Safari
Current node position of the TreeWalker.
Show Details no 1.0+ 7.0+ 9.0+ no
Availability

HTML DOM Level 2|W3C

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
Availability

HTML DOM Level 2|W3C

filter : NodeFilter
Filter used to filter nodes for traversal.
Show Details no 1.0+ 7.0+ 9.0+ no
Availability

HTML DOM Level 2|W3C

root : Node
Specifies the node that the TreeWalker begins traversal at.
Show Details no 1.0+ 7.0+ 9.0+ no
Availability

HTML DOM Level 2|W3C

whatToShow : Number
Specifies which Document nodes the TreeWalker will use in its traversal.
Show Details no 1.0+ 7.0+ 9.0+ no
Availability

HTML DOM Level 2|W3C

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
Node

For examples, see the quirksmode test page:

http://www.quirksmode.org/dom/tests/nodetree.html

Availability

HTML DOM Level 2|W3C

static lastChild() : Node
Returns the last child node of the current node.
Show Details no 1.0+ 7.0+ 9.0+ no

Returns
Node

For examples, see the quirksmode test page:

http://www.quirksmode.org/dom/tests/nodetree.html

Availability

HTML DOM Level 2|W3C

static nextNode() : Node
Returns the next node in the document subtree.
Show Details no 1.0+ 7.0+ 9.0+ no

Returns
Node

Availability

HTML DOM Level 2|W3C

static nextSibling() : Node
Returns the next sibling node of the current node.
Show Details no 1.0+ 7.0+ 9.0+ no

Returns
Node

For examples, see the quirksmode test page:

http://www.quirksmode.org/dom/tests/nodetree.html

Availability

HTML DOM Level 2|W3C

static parentNode() : Node
Returns the parent node of the current node.
Show Details no 1.0+ 7.0+ 9.0+ no

Returns
Node

For examples, see the quirksmode test page:

http://www.quirksmode.org/dom/tests/nodetree.html

Availability

HTML DOM Level 2|W3C

static previousNode() : Node
Returns the previous node in the document subtree.
Show Details no 1.0+ 7.0+ 9.0+ no

Returns
Node

Availability

HTML DOM Level 2|W3C

static previousSibling() : Node
Returns the previous sibling of the current node.
Show Details no 1.0+ 7.0+ 9.0+ no

Returns
Node

For examples, see the quirksmode test page:

http://www.quirksmode.org/dom/tests/nodetree.html

Availability

HTML DOM Level 2|W3C

References

NodeFilter|NodeIterator

Availability

HTML DOM Level 2|W3C

text_javascript aptana_docs