
Security News
Free Certified Patch for Critical Rails Active Storage Vulnerability
Socket has released a free Certified Patch for a critical Rails Active Storage vulnerability, giving developers time to upgrade to a secure Rails version.
node-iterator-shim
Advanced tools
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 shim attempts to modernize NodeIterator for use in all major browsers.
It does this through the following modifications:
The filter argument is really optional, even on IE.
The expandEntityReferences argument is discarded and the corresponding
property is not made available. It was never well supported and it is
deprecated.
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.
With a CommonJS bundler, use npm and then require('node-iterator-shim')
npm install node-iterator-shim
With a script tag, include one of node-iterator-shim.js or the minified
node-iterator-shim.min.js from the dist directory.
With AMD loaders, these scripts should also work.
document.createNodeIterator(root, whatToShow, [filter])See the documentation at the Mozilla Developer Network
for more information about using NodeIterator.
FAQs
Shim for NodeIterator reference node properties.
The npm package node-iterator-shim receives a total of 24 weekly downloads. As such, node-iterator-shim popularity was classified as not popular.
We found that node-iterator-shim 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.

Security News
Socket has released a free Certified Patch for a critical Rails Active Storage vulnerability, giving developers time to upgrade to a secure Rails version.

Security News
/Threat Research
A malicious Ruby gem runs a credential-stealing worm during installation, poisons AI coding tools, and can wipe files when a stolen GitHub token is revoked.

Security News
GitHub is tightening GitHub Actions security with new restrictions on privileged pull request workflows. Here's what changes and how maintainers are affected.