safejs

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyBytesToGo

func CopyBytesToGo(dst []byte, src Value) (int, error)

func CopyBytesToJS

func CopyBytesToJS(dst Value, src []byte) (int, error)

func Unsafe

func Unsafe(v Value) js.Value

Types

type Func

type Func safejs.Func

func FuncOf

func FuncOf(fn func(this Value, args []Value) any) (Func, error)

func (Func) Release

func (f Func) Release()

func (Func) Value

func (f Func) Value() Value

type Value

type Value safejs.Value

func Safe

func Safe(v js.Value) Value

func ValueOf

func ValueOf(value any) (Value, error)

func (Value) Call

func (v Value) Call(m string, args ...any) (Value, error)

func (Value) Get

func (v Value) Get(p string) (Value, error)

func (Value) GetBool

func (v Value) GetBool(p string) (bool, error)

func (Value) GetInt

func (v Value) GetInt(p string) (int, error)

func (Value) GetString

func (v Value) GetString(p string) (string, error)

func (Value) Index

func (v Value) Index(i int) (Value, error)

func (Value) IndexString

func (v Value) IndexString(i int) (string, error)

func (Value) IsNull added in v2.0.2

func (v Value) IsNull() bool

func (Value) IsUndefined added in v2.0.2

func (v Value) IsUndefined() bool

func (Value) New

func (v Value) New(args ...any) (Value, error)

Jump to

Keyboard shortcuts

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