events

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: 2 Imported by: 0

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Listen

func Listen(event string, target jst.Value) <-chan jst.Value

Listen attaches an event listener to target and returns a channel that receives the first argument of the event callback.

func ObserveIntersections

func ObserveIntersections(sel string, opts jst.Value) (<-chan jst.Value, func())

ObserveIntersections observes intersections for elements matching sel. opts is passed directly to the IntersectionObserver constructor. It returns a channel receiving IntersectionObserverEntry objects and a stop function to disconnect the observer and release resources.

func ObserveMutations

func ObserveMutations(sel string) (<-chan jst.Value, func())

ObserveMutations observes DOM mutations on the first node matching sel. It returns a channel receiving MutationRecord objects and a stop function that disconnects the observer and releases resources.

Types

This section is empty.

Jump to

Keyboard shortcuts

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