mirror of
https://github.com/tale/headplane.git
synced 2026-08-06 20:33:13 +00:00
24 lines
348 B
Go
24 lines
348 B
Go
//go:build js && wasm
|
|
|
|
package main
|
|
|
|
import (
|
|
"log"
|
|
"syscall/js"
|
|
|
|
"github.com/tale/headplane/internal/hp_ipn"
|
|
)
|
|
|
|
func main() {
|
|
js.Global().Set("newIPN", js.FuncOf(func(this js.Value, args []js.Value) any {
|
|
if len(args) != 1 {
|
|
log.Fatal("Usage: newIPN(config)")
|
|
return nil
|
|
}
|
|
|
|
return hp_ipn.NewIPN(args[0])
|
|
}))
|
|
|
|
<-make(chan bool)
|
|
}
|