Skip to content

Repository files navigation

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)

About

Lightweight browser implementation for Node's VM.

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages