client

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FuncMap

type FuncMap map[string]func(args ...js.Value) interface{}

FuncMap is a map of functions that you want available for being called inside of HTML

type Oasis

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

Oasis is used for configuring the client's available WASM functionality

func NewOasis

func NewOasis() *Oasis

func (*Oasis) AddFuncMap

func (o *Oasis) AddFuncMap(fmap FuncMap)

AddFuncMap allows you to add an entire FuncMap to o so that multiple functions can be added at once

func (*Oasis) AddToFuncMap

func (o *Oasis) AddToFuncMap(name string, fn func(args ...js.Value) interface{})

AddToFuncMap adds a function with the given name to o. If o doesn't have any functions added yet, it will create an underlying map to hold the newly added function

func (*Oasis) Run

func (o *Oasis) Run()

Run should be called after your Oasis has been configured. This will register all funcs in the FuncMap held by the Oasis and make them available to be used as functions for values of attributes of HTML elements. It will log an error if no functions were added to the FuncMap before being called and then exit

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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