Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateTypes ¶
GenerateTypes combines all TypeScript definitions from contributors and writes them to the specified path
Types ¶
type Contributor ¶
type Contributor interface {
Name() string
PolyfillSource() string // JS code prepended to every execution
TypesDefinition() string // TS types combined into types.d.ts
}
Contributor defines a package that extends the JS sandbox environment
type Sandbox ¶
type Sandbox struct {
// contains filtered or unexported fields
}
Sandbox represents a single execution context
func (*Sandbox) Execute ¶
Execute runs the JavaScript code and calls the specified function with JSON-serialized args
func (*Sandbox) RegisterGlobal ¶
func (s *Sandbox) RegisterGlobal(name string, cb v8.FunctionCallback) error
RegisterGlobal injects a dynamic Go function into this specific Sandbox execution context
Click to show internal directories.
Click to hide internal directories.