Documentation
¶
Rendered for js/wasm
Overview ¶
Package promise waits for JavaScript Promises in Go code that uses syscall/js, in goesm's output and in Go's own js/wasm port.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Await ¶
Await waits until the Promise p settles and returns its value, or its rejection reason as a js.Error, so that errors.As reaches the reason (a DOMException named "AbortError", say). A value that is not a Promise is returned as it is, as JavaScript's await does.
goesm imports the function below from await.ts, as a function that blocks until the Promise settles (its body is for Go's js/wasm port).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.