safejs

package
v3.0.0 Latest Latest
Warning

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

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

Documentation

Rendered for js/wasm

Overview

Package safejs provides safe access to JavaScript APIs.

Package safejs provides safe access to JavaScript APIs.

Package safejs provides safe access to JavaScript APIs.

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

func (v Value) IsNull() bool

func (Value) IsUndefined

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