wasm

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

package wasm provides access to the browser DOM from WebAssembly programs.

It ist a wrapper around syscall/js and provides only methods that are used in the go-frontend module or related modules used for the go-integrator platform.

Index

Constants

This section is empty.

Variables

View Source
var Document = Global.Get("document")
View Source
var Global = &value{js.Global()}
View Source
var Window = &window{js.Global()}

Functions

func LocalStorage

func LocalStorage() my.Memory

func SessionStorage

func SessionStorage() my.Memory

Types

type Event

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

func (*Event) PreventDefault

func (evt *Event) PreventDefault()

func (*Event) Target

func (evt *Event) Target() Value

type Value

type Value interface {
	Get(string) Value
	GetElementById(string) Value
	QuerySelectorAll(string) []Value
	Attribute(string) string
	TextContent() string
	TextById(string) string
	SetTextContent(string)
	Value() string
	AddEventListener(string, func(Event))
	SetInnerHTML(string)
	Dataset() Value
	String() string
}

Jump to

Keyboard shortcuts

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