1
0
mirror of https://github.com/taigrr/wasm-experiments synced 2025-01-18 04:03:21 -08:00
2018-08-11 20:55:13 +01:00

23 lines
323 B
Go

// +build js,wasm
package main
import (
"syscall/js"
)
var document js.Value
func init() {
document = js.Global().Get("document")
}
func main() {
div := document.Call("getElementById", "target")
node := document.Call("createElement", "div")
node.Set("innerHTML", "Hello World")
div.Call("appendChild", node)
}