Documentation
¶
Index ¶
- type Context
- type FunctionCallback
- type FunctionCallbackInfo
- type FunctionTemplate
- type JsValue
- func (v *JsValue) Array() []*JsValue
- func (v *JsValue) ArrayBufferContent() []byte
- func (j *JsValue) AsExported() *JsValue
- func (v *JsValue) BigInt() *big.Int
- func (v *JsValue) Boolean() bool
- func (v *JsValue) Call(recvr *JsValue, args ...*JsValue) *JsValue
- func (v *JsValue) Delete(key string) bool
- func (v *JsValue) DeleteIdx(idx uint32) bool
- func (j *JsValue) Export() *v8go.Value
- func (v *JsValue) Get(key string) *JsValue
- func (v *JsValue) GetIdx(idx uint32) *JsValue
- func (v *JsValue) Has(key string) bool
- func (v *JsValue) HasIdx(idx uint32) bool
- func (v *JsValue) Int32() int32
- func (v *JsValue) Integer() int64
- func (v *JsValue) IsArray() bool
- func (v *JsValue) IsArrayBuffer() bool
- func (v *JsValue) IsBigInt() bool
- func (v *JsValue) IsBoolean() bool
- func (v *JsValue) IsDate() bool
- func (v *JsValue) IsFalse() bool
- func (v *JsValue) IsFunction() bool
- func (v *JsValue) IsInt32() bool
- func (v *JsValue) IsMap() bool
- func (v *JsValue) IsNativeError() bool
- func (v *JsValue) IsNull() bool
- func (v *JsValue) IsNullOrUndefined() bool
- func (v *JsValue) IsNumber() bool
- func (v *JsValue) IsObject() bool
- func (v *JsValue) IsRegExp() bool
- func (v *JsValue) IsSet() bool
- func (v *JsValue) IsTrue() bool
- func (v *JsValue) IsUint32() bool
- func (v *JsValue) IsUndefined() bool
- func (j *JsValue) Local() *Local
- func (v *JsValue) MethodCall(methodName string, args ...*JsValue) *JsValue
- func (v *JsValue) MustMarshalJSON() []byte
- func (v *JsValue) Number() float64
- func (j *JsValue) Release() bool
- func (v *JsValue) SameValue(other *JsValue) bool
- func (v *JsValue) Set(key string, val *JsValue)
- func (v *JsValue) SetIdx(idx uint32, val *JsValue)
- func (v *JsValue) SetObjectMethod(name string, fn FunctionCallback)
- func (v *JsValue) String() string
- func (v *JsValue) StringArrry() []string
- func (v *JsValue) Uint32() uint32
- type Local
- func (l *Local) Close()
- func (l *Local) Context() *Context
- func (l *Local) Global() *JsValue
- func (l *Local) Import(v *v8go.Value) *JsValue
- func (l *Local) NewArray(values ...*JsValue) *JsValue
- func (l *Local) NewArrayBuffer(data []byte) *JsValue
- func (l *Local) NewBigInt(val *big.Int) *JsValue
- func (l *Local) NewBoolean(val bool) *JsValue
- func (l *Local) NewFunction(callback FunctionCallback) *JsValue
- func (l *Local) NewInt32(val int32) *JsValue
- func (l *Local) NewInt64(val int64) *JsValue
- func (l *Local) NewLocal() *Local
- func (l *Local) NewNumber(val float64) *JsValue
- func (l *Local) NewObject() *JsValue
- func (l *Local) NewString(val string) *JsValue
- func (l *Local) NewStringArray(values ...string) *JsValue
- func (l *Local) NullValue() *JsValue
- func (l *Local) RetainedValueCount() int
- func (l *Local) RunScript(script string, name string) *JsValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
func NewContext ¶
func NewContext(opt ...v8go.ContextOption) *Context
func (*Context) NewFunction ¶
func (c *Context) NewFunction(callback FunctionCallback) *v8go.Value
func (*Context) NewFunctionTemplate ¶
func (c *Context) NewFunctionTemplate(callback FunctionCallback) *FunctionTemplate
func (*Context) RunIdleTasks ¶
type FunctionCallback ¶
type FunctionCallback func(info *FunctionCallbackInfo) *JsValue
type FunctionCallbackInfo ¶
type FunctionCallbackInfo struct {
// contains filtered or unexported fields
}
func NewFunctionCallbackInfo ¶
func NewFunctionCallbackInfo(local *Local, this *JsValue, args ...*JsValue) *FunctionCallbackInfo
func (*FunctionCallbackInfo) Args ¶
func (i *FunctionCallbackInfo) Args() []*JsValue
Args returns a slice of the value arguments that are passed to the JS function.
func (*FunctionCallbackInfo) GetArg ¶
func (i *FunctionCallbackInfo) GetArg(idx int) *JsValue
func (*FunctionCallbackInfo) Local ¶
func (i *FunctionCallbackInfo) Local() *Local
func (*FunctionCallbackInfo) This ¶
func (i *FunctionCallbackInfo) This() *JsValue
This returns the receiver object "this".
type FunctionTemplate ¶
type FunctionTemplate struct {
// contains filtered or unexported fields
}
func (*FunctionTemplate) GetFunction ¶
func (t *FunctionTemplate) GetFunction(ctx *Context) *v8go.Value
func (*FunctionTemplate) GetLocalFunction ¶
func (t *FunctionTemplate) GetLocalFunction(local *Local) *JsValue
type JsValue ¶
type JsValue struct {
// contains filtered or unexported fields
}
func (*JsValue) ArrayBufferContent ¶
func (*JsValue) AsExported ¶
Mark the JsValue as exported and prevent it from being released automatically.
func (*JsValue) Export ¶
Export marks the JsValue as exported and returns the underlying *v8go.Value. You must release the returned *v8go.Value manually when you no longer need it.
func (*JsValue) IsArrayBuffer ¶
func (*JsValue) IsFunction ¶
func (*JsValue) IsNativeError ¶
func (*JsValue) IsNullOrUndefined ¶
func (*JsValue) IsUndefined ¶
func (*JsValue) MethodCall ¶
func (*JsValue) MustMarshalJSON ¶
func (*JsValue) SetObjectMethod ¶
func (v *JsValue) SetObjectMethod(name string, fn FunctionCallback)
func (*JsValue) StringArrry ¶
type Local ¶
type Local struct {
// contains filtered or unexported fields
}
func (*Local) Import ¶
Import imports an existing *v8go.Value into the Local context. The imported value is marked as exported, so it won't be released when the Local context is closed.
func (*Local) NewArrayBuffer ¶
func (*Local) NewBoolean ¶
func (*Local) NewFunction ¶
func (l *Local) NewFunction(callback FunctionCallback) *JsValue
func (*Local) NewStringArray ¶
func (*Local) RetainedValueCount ¶
Click to show internal directories.
Click to hide internal directories.