Skip to content
Most common DOM operations made safe by safer-function and safer-class.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cjs
esm
test
.gitignore
.npmignore
.travis.yml
LICENSE
README.md
index.js
min.js
package.json
rollup.config.js

README.md

safer-dom

Social Media Photo by freestocks.org on Unsplash

Build Status Coverage Status WebReflection status

Most common DOM operations made safe by safer-function and safer-class.

Example

// list of exports
import {
  CustomEvent,
  Event,
  HTMLElement,
  window,
  document,
  childNodes,
  children,
  createElement,
  addEventListener,
  removeEventListener,
  dispatchEvent,
  appendChild,
  removeChild,
  insertBefore,
  querySelector,
  querySelectorAll
} from 'safer-dom';

const body = querySelector(document, 'body');
const nodes = childNodes(body);
You can’t perform that action at this time.