Documentation
¶
Index ¶
- Constants
- func AddClosableObject(runtime *goja.Runtime, object *goja.Object)
- func AsExport(value goja.Value) interface{}
- func AsObject(value goja.Value) *goja.Object
- func CloseObjects(runtime *goja.Runtime)
- func GetArgsIntStringString(context interface{}, args []goja.Value) (int, string, string)
- func GetArgsString(context interface{}, args []goja.Value) string
- func GetArgsStringString(context interface{}, args []goja.Value) (string, string)
- func GetArgsStringStringString(context interface{}, args []goja.Value) (string, string, string)
- func GetArray(call goja.FunctionCall, index int) []interface{}
- func GetArrayOfString(call goja.FunctionCall, index int) []string
- func GetBool(call goja.FunctionCall, index int) bool
- func GetCallbackIfAny(call goja.FunctionCall) goja.Callable
- func GetExport(call goja.FunctionCall, index int) interface{}
- func GetInt(call goja.FunctionCall, index int) int64
- func GetMap(call goja.FunctionCall, index int) map[string]interface{}
- func GetObject(obj interface{}, name string) *goja.Object
- func GetRtDeepExport(runtime *goja.Runtime, name string) interface{}
- func GetRtDeepObject(runtime *goja.Runtime, name string) *goja.Object
- func GetRtDeepValue(runtime *goja.Runtime, name string) goja.Value
- func GetRtObject(runtime *goja.Runtime, name string) interface{}
- func GetRtRoot(runtime *goja.Runtime) string
- func GetString(call goja.FunctionCall, index int) string
- func SetRtRoot(runtime *goja.Runtime, value string)
- func ToArray(v interface{}) []interface{}
- func ToArrayOfMap(val interface{}) []map[string]interface{}
- type EventLoop
- type ModuleInfo
- type ModuleLoader
- type RuntimeContext
Constants ¶
View Source
const ( // reserved js variables ObjClosable = "_closable" // errors ErrorMissingParam = "missing_param" )
Variables ¶
This section is empty.
Functions ¶
func CloseObjects ¶
func GetArgsIntStringString ¶
func GetArgsString ¶
func GetArgsStringString ¶
func GetArray ¶
func GetArray(call goja.FunctionCall, index int) []interface{}
func GetArrayOfString ¶
func GetArrayOfString(call goja.FunctionCall, index int) []string
func GetCallbackIfAny ¶
func GetCallbackIfAny(call goja.FunctionCall) goja.Callable
func GetExport ¶
func GetExport(call goja.FunctionCall, index int) interface{}
func GetRtDeepExport ¶
func GetRtObject ¶
func ToArrayOfMap ¶
func ToArrayOfMap(val interface{}) []map[string]interface{}
Types ¶
type EventLoop ¶
type EventLoop struct {
// contains filtered or unexported fields
}
func NewEventLoop ¶
func (*EventLoop) Run ¶
Run calls the specified function, starts the event loop and waits until there are no more delayed jobs to run after which it stops the loop and returns. The instance of goja.Runtime that is passed to the function and any Values derived from it must not be used outside of the function.
func (*EventLoop) RunOnLoop ¶
RunOnLoop schedules to run the specified function in the context of the loop as soon as possible. The order of the runs is preserved (i.e. the functions will be called in the same order as calls to RunOnLoop()) The instance of goja.Runtime that is passed to the function and any Values derived from it must not be used outside of the function.
type ModuleInfo ¶
type ModuleInfo struct { Context *RuntimeContext Loader ModuleLoader }
Click to show internal directories.
Click to hide internal directories.