Versions in this module Expand all Collapse all v1 v1.0.1 May 21, 2021 Changes in this version + var EVAL_GLOBAL int = int(C.JS_EVAL_TYPE_GLOBAL) + var EVAL_MODULE int = int(C.JS_EVAL_TYPE_MODULE) + var EVAL_STRICT int = int(C.JS_EVAL_FLAG_STRICT) + var EVAL_STRIP int = int(C.JS_EVAL_FLAG_STRIP) + type Atom struct + func (a Atom) Free() + func (a Atom) String() string + func (a Atom) Value() Value + type Context struct + func (ctx *Context) Array() Value + func (ctx *Context) Atom(v string) Atom + func (ctx *Context) BigInt64(v uint64) Value + func (ctx *Context) BigUint64(v uint64) Value + func (ctx *Context) Bool(b bool) Value + func (ctx *Context) Call(this Value, fn Value, args []Value) (Value, error) + func (ctx *Context) DupValue(value Value) Value + func (ctx *Context) Error(err error) Value + func (ctx *Context) Eval(code string, evaltype int) (Value, error) + func (ctx *Context) EvalFile(code string, evaltype int, filename string) (Value, error) + func (ctx *Context) Exception() error + func (ctx *Context) Float64(v float64) Value + func (ctx *Context) Free() + func (ctx *Context) Function(fn Function) Value + func (ctx *Context) Globals() Value + func (ctx *Context) InitOsModule() + func (ctx *Context) InitStdModule() + func (ctx *Context) Int32(v int32) Value + func (ctx *Context) Int64(v int64) Value + func (ctx *Context) JsFunction(this Value, fn Value, args []Value) Value + func (ctx *Context) Null() Value + func (ctx *Context) Object() Value + func (ctx *Context) StdDumpError() + func (ctx *Context) StdHelper() + func (ctx *Context) String(v string) Value + func (ctx *Context) Throw(v Value) Value + func (ctx *Context) ThrowError(err error) Value + func (ctx *Context) ThrowInternalError(format string, args ...interface{}) Value + func (ctx *Context) ThrowRangeError(format string, args ...interface{}) Value + func (ctx *Context) ThrowReferenceError(format string, args ...interface{}) Value + func (ctx *Context) ThrowSyntaxError(format string, args ...interface{}) Value + func (ctx *Context) ThrowTypeError(format string, args ...interface{}) Value + func (ctx *Context) Uint32(v uint32) Value + func (ctx *Context) Undefined() Value + func (ctx *Context) Uninitialized() Value + type Error struct + Cause string + FileName string + LineNumber string + Message string + Stack string + func (err Error) Error() string + func (err Error) String() string + type Function func(ctx *Context, this Value, args []Value) Value + type JsInterface interface + Register func(runtime Runtime, context *Context, thread *JsThread) bool + Unregister func(runtime Runtime, context *Context, thread *JsThread) + type JsThread struct + func NewJsThread(Interface JsInterface) *JsThread + func (j *JsThread) Call(obj, fn Value, args []Value) (result Value, err error) + func (j *JsThread) Close() + func (j *JsThread) Eval(code string, evaltype int) (result Value, err error) + type ObjectId int64 + func NewObjectId(obj interface{}) ObjectId + func (id *ObjectId) Free() + func (id ObjectId) Get() (interface{}, bool) + func (id ObjectId) IsNil() bool + type PropertyEnum struct + Atom Atom + IsEnumerable bool + func (p PropertyEnum) String() string + type Runtime struct + func NewRuntime() Runtime + func (r Runtime) ExecutePendingJob() (Context, error) + func (r Runtime) Free() + func (r Runtime) NewContext() *Context + func (r Runtime) RunGC() + func (r Runtime) StdFreeHandlers() + type Value struct + func (v Value) BigFloat() *big.Float + func (v Value) BigInt() *big.Int + func (v Value) Bool() bool + func (v Value) Context() *Context + func (v Value) Error() error + func (v Value) Float64() float64 + func (v Value) Free() + func (v Value) Get(name string) Value + func (v Value) GetByAtom(atom Atom) Value + func (v Value) GetByUint32(idx uint32) Value + func (v Value) Int32() int32 + func (v Value) Int64() int64 + func (v Value) IsArray() bool + func (v Value) IsBigDecimal() bool + func (v Value) IsBigFloat() bool + func (v Value) IsBigInt() bool + func (v Value) IsBool() bool + func (v Value) IsConstructor() bool + func (v Value) IsError() bool + func (v Value) IsException() bool + func (v Value) IsFunction() bool + func (v Value) IsNull() bool + func (v Value) IsNumber() bool + func (v Value) IsObject() bool + func (v Value) IsString() bool + func (v Value) IsSymbol() bool + func (v Value) IsUndefined() bool + func (v Value) IsUninitialized() bool + func (v Value) Len() int64 + func (v Value) PropertyNames() ([]PropertyEnum, error) + func (v Value) Set(name string, val Value) + func (v Value) SetByAtom(atom Atom, val Value) + func (v Value) SetByInt64(idx int64, val Value) + func (v Value) SetByUint32(idx uint32, val Value) + func (v Value) SetFunction(name string, fn Function) + func (v Value) String() string + func (v Value) Uint32() uint32