Documentation ¶
Index ¶
- func FreeJsValues(values []*v8go.Value)
- func GoValue(value *v8go.Value) (interface{}, error)
- func GoValues(jsValues []*v8go.Value) ([]interface{}, error)
- func JsError(ctx *v8go.Context, err interface{}) *v8go.Value
- func JsException(ctx *v8go.Context, message interface{}) *v8go.Value
- func JsValue(ctx *v8go.Context, value interface{}) (*v8go.Value, error)
- func JsValues(ctx *v8go.Context, goValues []interface{}) ([]*v8go.Value, error)
- func ShareData(ctx *v8go.Context) (bool, map[string]interface{}, string, *v8go.Value)
- func Valuers(values []*v8go.Value) []v8go.Valuer
- type UndefinedT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GoValue ¶
GoValue cast JavasScript value to Golang value
* JavaScript -> Golang * |-------------------------------------------------------- * | | JavaScript | Golang | * |-------------------------------------------------------- * | ✅ | null | nil | * | ✅ | undefined | bridge.Undefined | * | ✅ | boolean | bool | * | ✅ | number(int) | int | * | ✅ | number(float) | float64 | * | ✅ | bigint | int64 | * | ✅ | string | string | * | ✅ | object(Int8Array) | []byte | * | ✅ | object | map[string]interface{} | * | ✅ | array | []interface{} | * | ❌ | object(Promise) | bridge.Promise | * | ❌ | function | bridge.Function | * |-------------------------------------------------------
func JsException ¶
JsException throw javascript Exception
func JsValue ¶
JsValue cast golang value to JavasScript value
* |------------------------------------------------------- * | | Golang | JavaScript | * |------------------------------------------------------- * | ✅ | nil | null | * | ✅ | bool | boolean | * | ✅ | int | number(int) | * | ✅ | uint | number(int) | * | ✅ | uint8 | number(int) | * | ✅ | uint16 | number(int) | * | ✅ | uint32 | number(int) | * | ✅ | int8 | number(int) | * | ✅ | int16 | number(int) | * | ✅ | int32 | number(int) | * | ✅ | float32 | number(float) | * | ✅ | float64 | number(float) | * | ✅ | int64 | bigint | * | ✅ | uint64 | bigint | * | ✅ | *big.Int | bigint | * | ✅ | string | string | * | ✅ | map[string]interface{} | object | * | ✅ | []interface{} | array | * | ✅ | []byte | object(Uint8Array) | * | ✅ | struct | object | * | ❌ | ?func | function | * |-------------------------------------------------------
Types ¶
type UndefinedT ¶
type UndefinedT byte
UndefinedT type of Undefined
var Undefined UndefinedT = 0x00
Undefined jsValue Undefined