root property (NodeIterator, TreeWalker)
Note: The TreeWalker and NodeIterator objects and their root properties are supported in Internet Explorer from version 9.This property can be set by the first parameter of the createNodeIterator and createTreeWalker methods.
You can find the related objects in the Supported by objects section below.
This property is read-only.
Reference to the root element.
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the root property:
Did you find this example helpful?
User Contributed Comments