A very light-weight execution context (window) wrapper for can-simple-dom
npm install can-simple-windowThe API was designed to be a drop in replacement for very simple jsdom implementations. Please note that this does not support the entire jsdom API and that can-simple-dom is a very limited implementation of the WHATWG DOM specification. If you are looking for an environment which more closely resembles a real browser, please use jsdom - it is a wonderful library.
##simpleWindow.env(html [, scripts], callback);
Replacement for jsdom.env
``js
var simpleWindow = require('can-simple-window');
simpleWindow.env(
'
Differences from jsdom
- You can only pass HTML in the first parameter (no URLs or file paths)
- The html passed in is only attached to the
- no code will be processed.
-