gopherwasm: Index | Files

package js

import ""

Package js offers API that works with both GopherJS and Wasm.

The API emulates syscall/js API, so please refer syscall/js API document ( for more detail.


Package Files

callback.go doc.go js_notwasm.go

func GetInternalObject Uses

func GetInternalObject(v Value) interface{}

type Callback Uses

type Callback = Func

Callback is for backward compatibility. Use Func instead.

func NewCallback Uses

func NewCallback(fn func([]Value)) Callback

NewCallback is for backward compatibility. Use FuncOf instead.

func NewEventCallback Uses

func NewEventCallback(flags EventCallbackFlag, fn func(event Value)) Callback

NewEventCallback is for backward compatibility. Use FuncOf instead.

type Error Uses

type Error struct {

func (Error) Error Uses

func (e Error) Error() string

type EventCallbackFlag Uses

type EventCallbackFlag int

EventCallbackFlag is for backward compatibility.

const (
    PreventDefault EventCallbackFlag = 1 << iota

type Func Uses

type Func struct {

func FuncOf Uses

func FuncOf(fn func(this Value, args []Value) interface{}) Func

func (Func) Release Uses

func (f Func) Release()

type Type Uses

type Type int
const (
    TypeUndefined Type = iota

func (Type) String Uses

func (t Type) String() string

type TypedArray Uses

type TypedArray struct {

func TypedArrayOf Uses

func TypedArrayOf(slice interface{}) TypedArray

func (*TypedArray) Release Uses

func (t *TypedArray) Release()

type Value Uses

type Value struct {
    // contains filtered or unexported fields

func Global Uses

func Global() Value

func Null Uses

func Null() Value

func Undefined Uses

func Undefined() Value

func ValueOf Uses

func ValueOf(x interface{}) Value

func (Value) Bool Uses

func (v Value) Bool() bool

func (Value) Call Uses

func (v Value) Call(m string, args ...interface{}) Value

func (Value) Float Uses

func (v Value) Float() float64

func (Value) Get Uses

func (v Value) Get(p string) Value

func (Value) Index Uses

func (v Value) Index(i int) Value

func (Value) InstanceOf Uses

func (v Value) InstanceOf(t Value) bool

func (Value) Int Uses

func (v Value) Int() int

func (Value) Invoke Uses

func (v Value) Invoke(args ...interface{}) Value

func (Value) Length Uses

func (v Value) Length() int

func (Value) New Uses

func (v Value) New(args ...interface{}) Value

func (Value) Set Uses

func (v Value) Set(p string, x interface{})

func (Value) SetIndex Uses

func (v Value) SetIndex(i int, x interface{})

func (Value) String Uses

func (v Value) String() string

func (Value) Type Uses

func (v Value) Type() Type

type ValueError Uses

type ValueError struct {
    Method string
    Type   Type

func (*ValueError) Error Uses

func (e *ValueError) Error() string

Package js imports 3 packages (graph) and is imported by 6 packages. Updated 2019-01-17. Refresh now. Tools for package owners.