root
Summary
The NodeIterator.root read-only property represents the Node that is the root of what the NodeIterator traverses.
Property of dom/NodeIteratordom/NodeIterator
Syntax
Note: This property is read-only.
var node = element.root;
Return Value
Returns an object of type DOM NodeDOM Node
Examples
var nodeIterator = document.createNodeIterator(
document.body,
NodeFilter.SHOW_ELEMENT,
{ acceptNode: function(node) { return NodeFilter.FILTER_ACCEPT; } },
false
);
root = nodeIterator.root; // document.body in this case
Syntax
root = nodeIterator.root;
Standards information
Related specifications
- DOM
- Living Standard
Attributions
Mozilla Developer Network : [NodeIterator.root Article]
Microsoft Developer Network: [root Property Article]