Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 495 Bytes

README.md

File metadata and controls

24 lines (17 loc) · 495 Bytes

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());