1.1.0 • Published 2 years ago

jsdom-web v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

jsdom-web

3,6kb web implementation of some jsdom features, to give you the same API

NOTE: Only most important features are implemented. The goal of this is to provide a lightweight implementation of the core jsdom API for the web, without implementing an own serializer and instead using the native document.createElement() and document.createTextNode() methods.

Usage

Put the code from this site at the top of your code

// JSDOM is already available in the global scope
const dom = new JSDOM('<div id="my-div">Hello World</div>');
const div = dom.window.document.getElementById('my-div');
console.log(div.textContent); // 'Hello World'
1.1.0

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago