0.1.1 • Published 5 years ago
safer-dom v0.1.1
safer-dom
Social Media Photo by freestocks.org on Unsplash
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);