await

command
v0.45.20 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2024 License: MIT Imports: 11 Imported by: 0

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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