jssupport

package
v0.0.0-...-37de81a Latest Latest
Warning

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

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

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureMemberFunction

func EnsureMemberFunction(object js.Value, name string) error

func EnsureString

func EnsureString(arg NamedValue, err error) (string, error)

func EnsureStringArray

func EnsureStringArray(arg NamedValue, err error) ([]string, error)

Types

type AsyncFunc

type AsyncFunc func(this js.Value, args []js.Value) (any, error)

type AsyncRunner

type AsyncRunner struct {
	// contains filtered or unexported fields
}

func (*AsyncRunner) CreateAsyncFunc

func (r *AsyncRunner) CreateAsyncFunc(innerFunc AsyncFunc) js.Func

type NamedValue

type NamedValue struct {
	Name  string
	Value js.Value
}

func GetNamedArgument

func GetNamedArgument(args []js.Value, name string) (NamedValue, error)

Function with named arguments in JS will look like this someFunc({param1: "value"})

func GetNamedProperty

func GetNamedProperty(object js.Value, name string) (NamedValue, error)

func GetOptionalNamedArgument

func GetOptionalNamedArgument(args []js.Value, name string) (NamedValue, error)

func NewNamedValue

func NewNamedValue(name string, val js.Value) NamedValue

Jump to

Keyboard shortcuts

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