NodeIterator
The dom-node-iterator
package provides a spec-compliant implementation of
NodeIterator
for environments that lack an implementation or conform to an
older specification.
In environments that implement an older specification or do not implement the
specification at all, behavior in the presence of DOM mutation is undefined.
This package implements the es-shim API
interface. It works in an ES5-supported environment with a DOM implementation
and complies with the spec.
Installation
Using npm:
npm install dom-node-iterator
Usage
require('dom-node-iterator/auto');
var iter = document.createNodeIterator(document.body);
var createNodeIterator = require('dom-node-iterator');
var iter = createNodeIterator.call(document, document.body);