browserify / vm-browserify

require('vm') like in node but for the browser
MIT License
201 stars 37 forks source link

Added Context to emulate node behaviour #8

Closed pluma closed 10 years ago

pluma commented 10 years ago

Fixes #7.

pluma commented 10 years ago

Having the Context object adds some redundancy, but if node demands it, it's the right thing to do if we want to make sure code written for browserify remains compatible with node.

pluma commented 10 years ago

I've adjusted the behaviour to further mimic nodes behaviour. This seems to also fix #6.

ghost commented 10 years ago

Published in 0.0.3. I had to tweak the code slightly to save the reference to win.eval() before calling it since the context copy from global was masking it.