dom-node-iterator

5.0.0 • Public • Published

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

// Install support, polluting the global namespace.
require('dom-node-iterator/auto');
var iter = document.createNodeIterator(document.body);
 
// Get the best implementation, without polluting the global namespace.
var createNodeIterator = require('dom-node-iterator');
var iter = createNodeIterator.call(document, document.body);

Readme

Keywords

Package Sidebar

Install

npm i dom-node-iterator

Weekly Downloads

305

Version

5.0.0

License

MIT

Unpacked Size

30.2 kB

Total Files

22

Last publish

Collaborators

  • tilgovi