mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-06 20:13:40 +00:00
16 lines
244 B
Go
16 lines
244 B
Go
package main
|
|
|
|
import (
|
|
"syscall/js"
|
|
)
|
|
|
|
func runner(this js.Value, args []js.Value) interface{} {
|
|
return args[0].Invoke(args[1]).String()
|
|
}
|
|
|
|
func main() {
|
|
wait := make(chan struct{}, 0)
|
|
js.Global().Set("runner", js.FuncOf(runner))
|
|
<-wait
|
|
}
|