Documentation
¶
Rendered for js/wasm
Overview ¶
Package wasm runs Go WebAssembly code for folio pages. Register a function per route, then call Run from main:
func main() {
wasm.Page("index", func() func() {
// set up the page; optionally return a cleanup function
return nil
})
wasm.Run()
}
The function for the current route runs on the first page load and after every in-place navigation; the previous page's cleanup runs first.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Always ¶
func Always(fn PageFunc)
Always registers fn to run on every page, before the route's own function.
Types ¶
Click to show internal directories.
Click to hide internal directories.