
Security News
NIST Under Federal Audit for NVD Processing Backlog and Delays
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
dom-node-iterator
Advanced tools
Supply Chain Security
Vulnerability
Quality
Maintenance
License
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
Socket optimized override available
NodeIterator
is an interface originally specified by
DOM Level 2.
While it is a useful tool for seeking within the nodes of the DOM, it has
some warts and its
implementation is inconsistent across browsers.
Among the problems with NodeIterator
are that it specifies arguments that
really should be optional, but are required on some browsers. Several browsers
expose two additional properties not in the original specification but later
added to the DOM living standard, referenceNode
and
pointerBeforeReferenceNode
.
This module attempts to modernize NodeIterator
for use in all major browsers.
It does this through the following modifications:
The whatToShow
and filter
arguments are optional.
The referenceNode
and pointerBeforeReferenceNode
properties are shimmed
when they aren't available.
All of this is done without changing the built-in support where it is adequate.
Using npm:
npm install dom-node-iterator
This package implements the es-shim API interface. It works in an ES3-supported environment and complies with the spec.
// Install support, polluting the global namespace.
require('dom-node-iterator/shim')();
var iter = document.createNodeIterator(document.body);
// Get the best implementation, without polluting the global namespace.
var createNodeIterator = require('dom-node-iterator/polyfill')();
var iter = createNodeIterator.call(document, document.body);
// Get the pure JavaScript implementation.
var createNodeIterator = require('dom-node-iterator/implementation');
var iter = createNodeIterator.call(document, document.body);
See the documentation at the Mozilla Developer Network
for more information about using NodeIterator
.
FAQs
A portable NodeIterator polyfill.
The npm package dom-node-iterator receives a total of 569 weekly downloads. As such, dom-node-iterator popularity was classified as not popular.
We found that dom-node-iterator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.
Security News
TypeScript Native Previews offers a 10x faster Go-based compiler, now available on npm for public testing with early editor and language support.