Documentation ¶
Index ¶
- type Broker
- type CoreModule
- type Engine
- func (e *Engine) Config() config.Config
- func (e *Engine) EventLoop() *eventloop.EventLoop
- func (e *Engine) PackagePath() string
- func (e *Engine) Registry() *require.Registry
- func (e *Engine) Run(fn func(*goja.Runtime) (goja.Value, error)) (goja.Value, error)
- func (e *Engine) RunScript(script string) (goja.Value, error)
- func (e *Engine) Runtime() *goja.Runtime
- func (e *Engine) Stop() int
- type EngineOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CoreModule ¶
type CoreModule struct {
// contains filtered or unexported fields
}
func NewCoreModule ¶
func NewCoreModule(engine *Engine, broker Broker) *CoreModule
func (*CoreModule) Enable ¶
func (c *CoreModule) Enable(r *goja.Runtime)
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) PackagePath ¶ added in v0.3.0
type EngineOption ¶
type EngineOption func(*Engine)
func WithBaseDirectory ¶ added in v0.3.0
func WithBaseDirectory(dir string) EngineOption
func WithConsole ¶ added in v0.3.0
func WithConsole(printer console.Printer) EngineOption
func WithModulsRegistry ¶ added in v0.3.0
func WithModulsRegistry(reg *modules.Registry) EngineOption
func WithSourceLoader ¶ added in v0.3.0
func WithSourceLoader(ldr require.SourceLoader) EngineOption
Click to show internal directories.
Click to hide internal directories.