# vm-browserify emulate node's vm module for the browser [![Build Status](https://travis-ci.org/browserify/vm-browserify.svg?branch=master)](https://travis-ci.org/browserify/vm-browserify) # example Just write some client-side javascript: ``` js var vm = require('vm'); window.addEventListener('load', function () { var res = vm.runInNewContext('a + 5', { a : 100 }); document.querySelector('#res').textContent = res; }); ``` compile it with [browserify](http://github.com/substack/node-browserify): ``` browserify entry.js -o bundle.js ``` then whip up some html: ``` html
result =