Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidFuncOpts = errorutil.NewWithFmt("invalid function options: %v") ErrNilRuntime = errorutil.New("runtime is nil") )
Functions ¶
func GetClassConstructor ¶ added in v3.2.0
func GetClassConstructor[T any](instance *T) func(call goja.ConstructorCall, runtime *goja.Runtime) *goja.Object
GetClassConstructor returns a constructor for any given go struct type for goja runtime
Types ¶
type GojaModule ¶
type GojaModule struct {
// contains filtered or unexported fields
}
func (*GojaModule) Enable ¶
func (p *GojaModule) Enable(runtime Runtime)
func (*GojaModule) Name ¶
func (p *GojaModule) Name() string
func (*GojaModule) Register ¶
func (p *GojaModule) Register() Module
func (*GojaModule) Require ¶
func (p *GojaModule) Require(runtime *goja.Runtime, module *goja.Object)
func (*GojaModule) Set ¶
func (p *GojaModule) Set(objects Objects) Module
func (*GojaModule) String ¶
func (p *GojaModule) String() string
Click to show internal directories.
Click to hide internal directories.