shortcuts/plot/main.go
Anton Nesterov 1d9cee5ee1
go plots
2024-09-29 20:27:50 +02:00

23 lines
378 B
Go

//go:build js && wasm
// +build js,wasm
package main
import (
"l12.xyz/x/shortcuts/plot/src"
"syscall/js"
)
func InitPlotExports(this js.Value, args []js.Value) interface{} {
exports := args[0]
exports.Set("Hist", js.FuncOf(src.HistPlot))
return nil
}
func main() {
c := make(chan struct{}, 0)
js.Global().Set("__InitPlotExports", js.FuncOf(InitPlotExports))
<-c
}