Skip to content

commonjs wrapper / get rid of globals #3

Description

@bmeck

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions