js

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2019 License: BSD-2-Clause Imports: 3 Imported by: 32

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

Constants

View Source
const (
	TypeUndefined = js.TypeUndefined
	TypeNull      = js.TypeNull
	TypeBoolean   = js.TypeBoolean
	TypeNumber    = js.TypeNumber
	TypeString    = js.TypeString
	TypeSymbol    = js.TypeSymbol
	TypeObject    = js.TypeObject
	TypeFunction  = js.TypeFunction
)

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

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

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 Error

type Error = js.Error

type EventCallbackFlag

type EventCallbackFlag int

EventCallbackFlag is for backward compatibility.

const (
	PreventDefault EventCallbackFlag = 1 << iota
	StopPropagation
	StopImmediatePropagation
)

type Func added in v1.1.0

type Func = js.Func

func FuncOf added in v1.1.0

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

type Type

type Type = js.Type

type TypedArray

type TypedArray = js.TypedArray

func TypedArrayOf

func TypedArrayOf(slice interface{}) TypedArray

type Value

type Value = js.Value

func Global

func Global() Value

func Null

func Null() Value

func Undefined

func Undefined() Value

func ValueOf

func ValueOf(x interface{}) Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL