Class Firebug.HTMLLib.DOMWalker
Implements an ordered traveral of the document, including attributes and
iframe contents within the results.
Note that the order for attributes is not defined. This will follow the
same order as the Element.attributes accessor.
Defined in: htmlLib.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Constructs a DOMWalker instance.
|
| Method Attributes | Method Name and Description |
|---|---|
|
Retrieves the current node.
|
|
|
nextNode()
Move to the next node.
|
|
|
Move to the previous node.
|
|
|
reset()
Resets the walker position back to the initial position.
|
Class Detail
Firebug.HTMLLib.DOMWalker(root)
Constructs a DOMWalker instance.
- Parameters:
- {Element} root
- Element to traverse
Method Detail
currentNode()
Retrieves the current node.
- Returns:
- The current node, if not past the beginning or end of the iteration.
nextNode()
Move to the next node.
- Returns:
- The next node if one exists, otherwise undefined.
previousNode()
Move to the previous node.
- Returns:
- The previous node if one exists, undefined otherwise.
reset()
Resets the walker position back to the initial position.