js

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

func Call(name string, args ...interface{}) jst.Value

Call invokes a function on the global object.

func Console

func Console() jst.Value

Console returns the console object.

func CustomEvent

func CustomEvent() jst.Value

CustomEvent returns the CustomEvent constructor.

func Doc

func Doc() jst.Value

Doc is an alias for Document.

func Document

func Document() jst.Value

Document returns the document object.

func Error

func Error() jst.Value

Error returns the Error constructor.

func Expose

func Expose(name string, fn func())

Expose registers a no-argument Go function under the given name on the JavaScript global object.

func ExposeEvent

func ExposeEvent(name string, fn func(jst.Value))

ExposeEvent registers a Go function that receives the first argument from the JavaScript call as the event object.

func ExposeFunc

func ExposeFunc(name string, fn func(this jst.Value, args []jst.Value) interface{})

ExposeFunc registers a Go function with custom arguments on the JavaScript global object.

func Fetch

func Fetch(args ...interface{}) jst.Value

Fetch wraps the global fetch function.

func Get

func Get(name string) jst.Value

Get returns a property from the global object.

func Global

func Global() jst.Value

Global returns the JavaScript global object.

func History

func History() jst.Value

History returns the history object.

func IntersectionObserver

func IntersectionObserver() jst.Value

IntersectionObserver returns the IntersectionObserver constructor.

func JSON

func JSON() jst.Value

JSON returns the JSON object.

func LS

func LS() jst.Value

LS is an alias for LocalStorage.

func Loc

func Loc() jst.Value

Loc is an alias for Location.

func LocalStorage

func LocalStorage() jst.Value

LocalStorage returns the localStorage object.

func Location

func Location() jst.Value

Location returns the location object.

func MutationObserver

func MutationObserver() jst.Value

MutationObserver returns the MutationObserver constructor.

func Perf

func Perf() jst.Value

Perf is an alias for Performance.

func Performance

func Performance() jst.Value

Performance returns the performance object.

func RAF

func RAF(cb jst.Func)

RAF is an alias for RequestAnimationFrame.

func RequestAnimationFrame

func RequestAnimationFrame(cb jst.Func)

RequestAnimationFrame wraps the requestAnimationFrame global function.

func Set

func Set(name string, v interface{})

Set assigns a value on the global object.

func Stack

func Stack() string

Stack returns the current JavaScript stack trace using Error().stack.

func Win

func Win() jst.Value

Win is an alias for Window.

func Window

func Window() jst.Value

Window returns the window object.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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