Documentation ¶
Overview ¶
Package xjs provides some simple, but often needed shortcut funcs for gopherJS
Index ¶
- func Alert(format string, params ...interface{})
- func AppendChildren(parent dom.Node, children ...dom.Node) dom.Node
- func Body() *dom.HTMLBodyElement
- func CreateElement(name string) dom.Element
- func Log(format string, params ...interface{})
- func RemoveChildren(node dom.Node) dom.Node
- func SetInnerText(node dom.Node, text string) dom.Node
- func SetPreText(node dom.Node, text string) dom.Node
- func Text(text string) *dom.Text
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Alert ¶
func Alert(format string, params ...interface{})
Alert provides for formated alert boxes
func AppendChildren ¶
AppendChildren appends all the given children to the parent.
func CreateElement ¶
CreateElement is a shortcut to create an element with the given name
func Log ¶
func Log(format string, params ...interface{})
Log prints a formatted string to the javascript console
func RemoveChildren ¶
RemoveChildren removes all of the child nodes of the node given
func SetInnerText ¶
SetInnerText removes all child nodes from the given node and sets a single Text Node with the given string
func SetPreText ¶
SetPreText does similar to SetInnerText, but linebreaks are converted to <br />s
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.