jsutil

package
v2.6.0-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Rendered for js/wasm

Overview

Package jsutil offers utility functions for Wasm.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TemporaryFloat32Array added in v2.1.0

func TemporaryFloat32Array(minLength int, data []float32) js.Value

TemporaryFloat32Array returns a Float32Array whose length is at least minLength. Be careful that the length can exceed the given minLength. data must be a slice of a numeric type for initialization, or nil if you don't need initialization.

func TemporaryInt32Array added in v2.5.0

func TemporaryInt32Array(minLength int, data []int32) js.Value

TemporaryInt32Array returns a Int32Array whose length is at least minLength. Be careful that the length can exceed the given minLength. data must be a slice of a numeric type for initialization, or nil if you don't need initialization.

func TemporaryUint8ArrayFromFloat32Slice added in v2.3.0

func TemporaryUint8ArrayFromFloat32Slice(minLength int, data []float32) js.Value

TemporaryUint8ArrayFromFloat32Slice returns a Uint8Array whose length is at least minLength from a float32 slice. Be careful that the length can exceed the given minLength. data must be a slice of a numeric type for initialization, or nil if you don't need initialization.

func TemporaryUint8ArrayFromUint16Slice added in v2.3.0

func TemporaryUint8ArrayFromUint16Slice(minLength int, data []uint16) js.Value

TemporaryUint8ArrayFromUint16Slice returns a Uint8Array whose length is at least minLength from an uint16 slice. Be careful that the length can exceed the given minLength. data must be a slice of a numeric type for initialization, or nil if you don't need initialization.

func TemporaryUint8ArrayFromUint8Slice added in v2.3.0

func TemporaryUint8ArrayFromUint8Slice(minLength int, data []uint8) js.Value

TemporaryUint8ArrayFromUint8Slice returns a Uint8Array whose length is at least minLength from an uint8 slice. Be careful that the length can exceed the given minLength. data must be a slice of a numeric type for initialization, or nil if you don't need initialization.

Types

This section is empty.

Jump to

Keyboard shortcuts

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