Documentation
¶
Overview ¶
Package web is NSGo's browser backend: Go compiled to WebAssembly, one absolutely positioned element per view. Text is measured with the browser's own layout in a hidden element styled as the one that draws it, so measuring and drawing agree. The browser loads and draws images from their URIs, and alerts are dialogs drawn over the page.
In WebAssembly the engine goroutine shares the page's only thread, so text is measured and batches are applied right where the engine asks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
// Mount is the CSS selector of the element the app fills; the body
// when empty.
Mount string
// ID names the app's entries in localStorage.
ID string
// Components are the native components Native elements name.
Components driver.NativeComponents
// Fonts are font files under the app's resources, registered before
// the first view.
Fonts []string
// Appearance is the appearance the app starts in.
Appearance driver.Appearance
// Host names the global the loader keeps the page's host bridge in
// (host.go); without one the app has no host.
Host string
}
Options configure the page.
Source Files
¶
- alert.go
- canvas.go
- caret.go
- classes.go
- clipboard.go
- collect.go
- decor.go
- dom.go
- edge.go
- effect.go
- env.go
- files.go
- focus.go
- fonts.go
- gesture.go
- history.go
- host.go
- image.go
- input.go
- keys.go
- localtime.go
- measure.go
- media.go
- notifications.go
- permissions.go
- picked.go
- scroll.go
- selection.go
- shader.go
- sticky.go
- storage.go
- touch.go
- video.go
- web.go
- webview.go
- wheel.go