Documentation
¶
Overview ¶
runtime/native_std.go
Index ¶
- func AddClass(elementId, class string)
- func Alert(s string)
- func ConsoleError(s string)
- func ConsoleLog(s string)
- func ConsoleWarn(s string)
- func GetInnerHTML(elementId string) string
- func GetValue(elementId string) string
- func HTTPGetText(url string) (string, error)
- func LocalStorageGetItem(key string) string
- func LocalStorageSetItem(key, value string)
- func OpenWindow(url string)
- func RegisterHostNatives(vm *interp.Interpreter, canvas *CanvasBinding)
- func RemoveClass(elementId, class string)
- func SetInnerHTML(elementId, html string)
- func SetValue(elementId, value string)
- type CanvasBinding
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConsoleError ¶
func ConsoleError(s string)
func ConsoleLog ¶
func ConsoleLog(s string)
func ConsoleWarn ¶
func ConsoleWarn(s string)
func GetInnerHTML ¶
GetInnerHTML returns the innerHTML of an element (best-effort). If nanoGoPostMessage is present we don't try to synchronously fetch from the main thread and return an empty string; otherwise we query document directly.
func HTTPGetText ¶
func LocalStorageGetItem ¶
func LocalStorageSetItem ¶
func LocalStorageSetItem(key, value string)
func OpenWindow ¶
func OpenWindow(url string)
func RegisterHostNatives ¶
func RegisterHostNatives(vm *interp.Interpreter, canvas *CanvasBinding)
RegisterHostNatives wires host-provided functions to the interpreter globals.
func RemoveClass ¶
func RemoveClass(elementId, class string)
func SetInnerHTML ¶
func SetInnerHTML(elementId, html string)
Types ¶
type CanvasBinding ¶
func BindCanvasById ¶
func BindCanvasById(elementId string, cellSize int) CanvasBinding
func (*CanvasBinding) Flush ¶
func (c *CanvasBinding) Flush()
func (*CanvasBinding) SetCell ¶
func (c *CanvasBinding) SetCell(x, y int, alive bool)
func (*CanvasBinding) Size ¶
func (c *CanvasBinding) Size(gridW, gridH int)
Click to show internal directories.
Click to hide internal directories.