js

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2018 License: BSD-2-Clause Imports: 3 Imported by: 29

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInternalObject

func GetInternalObject(v Value) interface{}

Types

type Callback

type Callback struct {
	Value
}

func NewCallback

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

func NewEventCallback

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

func (Callback) Release

func (c Callback) Release()

type Error

type Error struct {
	Value
}

func (Error) Error

func (e Error) Error() string

type EventCallbackFlag

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

type Type

type Type int
const (
	TypeUndefined Type = iota
	TypeNull
	TypeBoolean
	TypeNumber
	TypeString
	TypeSymbol
	TypeObject
	TypeFunction
)

func (Type) String

func (t Type) String() string

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 Global

func Global() Value

func Null

func Null() Value

func Undefined

func Undefined() Value

func ValueOf

func ValueOf(x interface{}) Value

func (Value) Bool

func (v Value) Bool() bool

func (Value) Call

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

func (Value) Float

func (v Value) Float() float64

func (Value) Get

func (v Value) Get(p string) Value

func (Value) Index

func (v Value) Index(i int) Value

func (Value) InstanceOf

func (v Value) InstanceOf(t Value) bool

func (Value) Int

func (v Value) Int() int

func (Value) Invoke

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

func (Value) Length

func (v Value) Length() int

func (Value) New

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

func (Value) Set

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

func (Value) SetIndex

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

func (Value) String

func (v Value) String() string

func (Value) Type

func (v Value) Type() Type

type ValueError

type ValueError struct {
	Method string
	Type   Type
}

func (*ValueError) Error

func (e *ValueError) Error() string

Jump to

Keyboard shortcuts

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