Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commonjs wrapper / get rid of globals #3

Open
bmeck opened this issue Jan 18, 2013 · 0 comments
Open

commonjs wrapper / get rid of globals #3

bmeck opened this issue Jan 18, 2013 · 0 comments

Comments

@bmeck
Copy link
Contributor

bmeck commented Jan 18, 2013

probably just going to wrap in a different context for first iteration, i can take the issue that far at least. This will have primitives not matching outer context though (which is fine for first iteration).

cajaVM should not be a global, and should have a per instance shared import cache.
API could be something like:

  ses.createVM()

VMs need to provide:

  exports.eval(code) // no way to set the sandbox?
  exports.compileExpr(code, sandbox)
  exports.compileModule(code)(sandbox)
  exports.Function(args..., code)

Have prototype, reading up on caja stuff but docs are inline...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant