Discover Packages
go.vxn.dev/littr
cmd
await
command
Version:
v0.45.20
Opens a new window with list of versions in this module.
Published: Dec 31, 2024
License: MIT
Opens a new window with license information.
Imports: 11
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
await fetch() implementation using go-app's JS wrapper
This is just an attempt on how to make the WASM client binary even more lighter with the gzip compression.
The implementation also handles errors via the catch(fn)
function with a callback.
Main source of inspiration: https://github.com/maxence-charriere/go-app/issues/995#issuecomment-2394535140
how to use
In shell run these:
cd cmd/await
mkdir -p web
# to make it run, execute these
GOOS=js GOARCH=wasm go build -o web/app.wasm main.go
go run main.go
# ...or just in the appropriate folder
make run
Then:
open your web browser and navigate to http://localhost:8081/
press F12 to see the console log
press the button in the page to see the effect
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.