Documentation ¶
Overview ¶
Package js offers API that works with both GopherJS and Wasm.
The API emulates syscall/js API, so please refer syscall/js API document (https://golang.org/pkg/syscall/js/) for more detail.
Index ¶
- func GetInternalObject(v Value) interface{}
- type Callback
- type Error
- type EventCallbackFlag
- type Func
- type Type
- type TypedArray
- type Value
- func (v Value) Bool() bool
- func (v Value) Call(m string, args ...interface{}) Value
- 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) 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) Type() Type
- type ValueError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetInternalObject ¶
func GetInternalObject(v Value) interface{}
Types ¶
type Callback ¶
type Callback = Func
Callback is for backward compatibility. Use Func instead.
func NewCallback ¶
NewCallback is for backward compatibility. Use FuncOf instead.
func NewEventCallback ¶
func NewEventCallback(flags EventCallbackFlag, fn func(event Value)) Callback
NewEventCallback is for backward compatibility. Use FuncOf instead.
type EventCallbackFlag ¶
type EventCallbackFlag int
EventCallbackFlag is for backward compatibility.
const ( PreventDefault EventCallbackFlag = 1 << iota StopPropagation StopImmediatePropagation )
type TypedArray ¶
type TypedArray struct {
Value
}
func TypedArrayOf ¶
func TypedArrayOf(slice interface{}) TypedArray
func (*TypedArray) Release ¶
func (t *TypedArray) Release()
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
func (Value) InstanceOf ¶
type ValueError ¶
func (*ValueError) Error ¶
func (e *ValueError) Error() string
Click to show internal directories.
Click to hide internal directories.