utils

package
v0.0.0-...-6c0504e Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var JsGlobal = js.Global()

Functions

func ConvertTypedArrayToFloat64Slice

func ConvertTypedArrayToFloat64Slice(value js.Value) []float64

func CreateCanvasElement

func CreateCanvasElement() js.Value

func CreateElementNS

func CreateElementNS(name string) js.Value

func FuncOf

func FuncOf(fn func(this JsValue, args JsValueSlice) any) js.Func

func If

func If[T any](cmp bool, okVal, elseVal T) T

func IfFunc

func IfFunc[T any](cmp bool, okVal, elseVal func() T) T

func InstanceOf

func InstanceOf(value *js.Value, className string) bool

func JsNull

func JsNull() js.Value

func JsUndefined

func JsUndefined() js.Value

func NotNullOrDefault

func NotNullOrDefault[T any](val *T, defaultVal T) T

Types

type JsValue

type JsValue js.Value

func (JsValue) AsJsValue

func (j JsValue) AsJsValue() js.Value

type JsValueSlice

type JsValueSlice []js.Value

Jump to

Keyboard shortcuts

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