0.0.3 • Published 11 months ago
dominimal v0.0.3
dominimal
A minimal subset of jsdom, focusing on DOM (and omitting wider Web APIs).
Installation
npm install dominimal
Usage
// dominimal exports all the same modules as jsdom.
const dominimal = require('dominimal');
const { JSDOM } = dominimal;
const jsdom = new JSDOM('', { pretendToBeVisual: true });
const { document } = jsdom.window;
const body = document.createElement('body');
document.documentElement.appendChild(body);
console.log(jsdom.serialize());