Documentation ¶
Rendered for js/wasm
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App interface { // Name returns a descriptive name for the application, suitable for // display in logs. Name() string // Init performs any initialization work needed for the application. Init(ctx jsutil.AsyncContext, cleanup *jsutil.CleanupFuncs) error }
App defines a WASM application that can be managed with the Run routine (see below).
type Context ¶ added in v0.0.27
type Context struct {
// contains filtered or unexported fields
}
func (*Context) Run ¶ added in v0.0.27
func (a *Context) Run()
Run runs the application. Run is expected to be called directly from the main function of the program, and thus is permitted to block.
Run exports the following async functions to be available from Javascript:
initWaitFunc (see above): waits for app initialization to complete. If this function returns successfully, then the App.Init() function is guaranteed to have completed without error. terminateFunc (see above): signals the application to terminate; Run() will terminate.
Click to show internal directories.
Click to hide internal directories.