This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

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