tinymce.dom.TreeWalker

TreeWalker class enables you to walk the DOM in a linear manner.

Examples

var walker = new tinymce.dom.TreeWalker(startNode);

do {
    console.log(walker.current());
} while (walker.next());

Constructors

name summary defined by
TreeWalker() Constructs a new TreeWalker instance. tinymce.dom.TreeWalker

Methods

name summary defined by
current() Returns the current node. tinymce.dom.TreeWalker
next() Walks to the next node in tree. tinymce.dom.TreeWalker
prev() Walks to the previous node in tree. tinymce.dom.TreeWalker

Constructors

TreeWalker

public constructor function TreeWalker(startNode:Node, rootNode:node)

Constructs a new TreeWalker instance.

Parameters

Methods

current

current():Node

Returns the current node.

Return value

next

next():Node

Walks to the next node in tree.

Return value

prev

prev():Node

Walks to the previous node in tree.

Return value

Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.