Skip to content
Lightweight browser implementation for Node's VM.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
testing/helpers
.babelrc.js
.eslintrc.js
.flowconfig
.gitignore
CHANGELOG.md
README.md
jest-setup.js
package.json
yarn.lock

README.md

vmdom NPM Coverage

Lightweight browser implementation for Node's VM.

Installation

npm

npm install vmdom

yarn

yarn add vmdom

Usage

import {Browser} from 'vmdom'

const browser = new Browser()
const {eval, window} = browser

// Execute arbitrary JavaScript using eval
eval("window.foo = 'bar'")

console.log(window.foo) // logs "bar" to console

// When you are done make sure all timers, event handlers, etc are cleaned up
Browser.destroy(browser)
You can’t perform that action at this time.