Apply changes to DOM Elements with minimal work.
npm install virtual-dom-nodes
Apply changes to DOM Elements with minimal work. Utilizes internal "virtual DOM" to avoid causing expensive and slow DOM manipulations.
``ts
import { update } from 'virtual-dom-nodes';
const element = document.createElement('div');
element.setAttribute('id', 'demo-id');
element.appendChild(document.createTextNode('Hello world'));
// Optimally applies required changes to element
update(element, "
> element.outerHTML
'
$3
`ts
import { htmlToElement } from 'virtual-dom-nodes';const element = htmlToElement(
);> element instanceof Element
true
> element.outerHTML
'
Hello world!'
``