Web API package for use when compling Go to WASM
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

18 lines
375 B

package main
import (
"github.com/brettlangdon/go-dom/v1/console"
"github.com/brettlangdon/go-dom/v1/document"
"github.com/brettlangdon/go-dom/v1/window"
)
func main() {
loc := window.GetLocation()
console.Dir(loc.JSValue())
nodes := document.QuerySelectorAll("div")
var i float64 = 0
for ; i < nodes.GetLength(); i++ {
console.Dir(nodes.Item(i).JSValue())
}
}