Javascript Reference
Categories: TreeWalker

javascript TreeWalker currentNode

@March 15, 2008, 1:22 a.m.
currentNodeFirefox/Netscape/NN 7 IE n/a Chrome/Safari/DOM 2  

Read/Write  

Returns a reference to the node where the TreeWalker's pointer is positioned. But more importantly, you can also assign a document tree node reference to this property to manually set a new position for the pointer. If the assigned node would normally be filtered out of the list, the next method invocation is performed from the position as if the assigned node were not filtered out of the list.

 
Example
 
myTreeWalker.currentNode = document.getElementById("main");
 
Value

Reference to a document tree node.

 
Default

First node of the document.


Powered by Linode.