You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
423 B
Go
31 lines
423 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"syscall/js"
|
|
"time"
|
|
)
|
|
|
|
func callStuff(this js.Value, args []js.Value) interface{} {
|
|
cb := args[0]
|
|
cb.Invoke(
|
|
js.ValueOf(
|
|
map[string]interface{}{
|
|
"heey": "heei",
|
|
"haai": "hoei",
|
|
"jaaaaa": 123,
|
|
"joe": time.Now().Format(time.RFC3339),
|
|
},
|
|
),
|
|
)
|
|
|
|
return nil
|
|
}
|
|
|
|
func main() {
|
|
js.Global().Set("teering", js.FuncOf(callStuff))
|
|
log.Println("heey")
|
|
|
|
select {}
|
|
}
|