1.0.0 • Published 10 months ago
dom-reset v1.0.0
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
1.0.0
10 months ago