Documentation
¶
Index ¶
- func CopyBytesToGo(dst []byte, src Value) int
- func CopyBytesToJS(dst Value, src []byte) int
- type Error
- type Func
- type Type
- type Value
- func (v Value) Bool() bool
- func (v Value) Call(m string, args ...interface{}) Value
- func (v Value) Delete(p string)
- func (v Value) Equal(w Value) bool
- func (v Value) Float() float64
- func (v Value) Get(p string) Value
- func (v Value) Index(i int) Value
- func (v Value) InstanceOf(t Value) bool
- func (v Value) Int() int
- func (v Value) Invoke(args ...interface{}) Value
- func (v Value) IsNaN() bool
- func (v Value) IsNull() bool
- func (v Value) IsUndefined() bool
- func (v Value) JSValue() Value
- func (v Value) Length() int
- func (v Value) New(args ...interface{}) Value
- func (v Value) Set(p string, x interface{})
- func (v Value) SetIndex(i int, x interface{})
- func (v Value) String() string
- func (v Value) Truthy() bool
- func (v Value) Type() Type
- type ValueError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyBytesToGo ¶
CopyBytesToGo copies bytes from the Uint8Array src to dst. It returns the number of bytes copied, which will be the minimum of the lengths of src and dst. CopyBytesToGo panics if src is not an Uint8Array.
func CopyBytesToJS ¶
CopyBytesToJS copies bytes from src to the Uint8Array dst. It returns the number of bytes copied, which will be the minimum of the lengths of src and dst. CopyBytesToJS panics if dst is not an Uint8Array.
Types ¶
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
func (Value) Delete ¶
Delete deletes the JavaScript property p of value v. It panics if v is not a JavaScript object.
func (Value) InstanceOf ¶
func (Value) IsUndefined ¶
func (Value) String ¶
String returns the value v as a string. String is a special case because of Go's String method convention. Unlike the other getters, it does not panic if v's Type is not TypeString. Instead, it returns a string of the form "<T>" or "<T: V>" where T is v's type and V is a string representation of v's value.
type ValueError ¶
func (*ValueError) Error ¶
func (e *ValueError) Error() string