Documentation
¶
Index ¶
- type MainFuncType
- type WrappedVm
- func (v *WrappedVm) Load() error
- func (v *WrappedVm) RegisterModule(moduleName string, module interface{}) error
- func (v *WrappedVm) Run(args []interface{}) (interface{}, error)
- func (v *WrappedVm) RunFunc(funcName string, args []interface{}) (result interface{}, err error)
- func (v *WrappedVm) ToValue(i interface{}) goja.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MainFuncType ¶
type MainFuncType func([]interface{}) interface{}
type WrappedVm ¶
func NewVmAndLoad ¶
func NewVmAndLoadWithFile ¶ added in v0.0.2
func (*WrappedVm) RegisterModule ¶
func (*WrappedVm) Run ¶
func (v *WrappedVm) Run(args []interface{}) (interface{}, error)
执行脚本中的 main 函数
Click to show internal directories.
Click to hide internal directories.