jsutil

package
v0.1.12 Latest Latest
Warning

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

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

Documentation

Rendered for js/wasm

Overview

Package jsutil provides utility functions for interacting with syscall/js.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyUint8Array

func CopyUint8Array(buffer *js.Value) ([]byte, int)

CopyUint8Array copies the contents of a Uint8Array to a byte slice. It returns the byte slice and the number of bytes copied.

func MakeUint8Array

func MakeUint8Array(bytes []byte) js.Value

MakeUint8Array creates a new Uint8Array from a byte slice.

Types

type JSValueWrapper

type JSValueWrapper struct {
	js.Value
}

JSValueWrapper implements the util.JSValuer interface.

func (JSValueWrapper) Get

func (w JSValueWrapper) Get(key string) util.JSValuer

Jump to

Keyboard shortcuts

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