dom-reset
v1.0.0
Published
A lightweight ES module for resetting and manipulating the DOM
Downloads
5
Maintainers
Readme
DomReset
A lightweight ES module for resetting and manipulating the DOM with ease.
Installation
npm install dom-resetUsage
Resetting Styles
import { DomReset } from 'dom-reset';
// Remove all existing stylesheets and inline styles
DomReset.resetStyles();Resetting Full DOM
// Replace entire document with new content
DomReset.resetFullDOM('<h1>New Document</h1>');Resetting Styles and Content
// Reset styles and replace body content
DomReset.resetStylesAndContent('<div>New Content</div>');Methods
resetStyles(): Removes all stylesheets and inline stylesresetFullDOM(newContent): Replaces entire document with new contentresetStylesAndContent(newContent): Resets styles and replaces body content
License
MIT
