cutego/qt_wasm.go

21 lines
381 B
Go
Raw Normal View History

// +build js,wasm
package qt
2018-11-06 20:16:33 +03:00
import (
"syscall/js"
"unsafe"
)
2018-11-06 20:16:33 +03:00
func init() {
Module.Set("_callbackReleaseTypedArray", js.FuncOf(func(_ js.Value, args []js.Value) interface{} {
ReleaseTypedArray(unsafe.Pointer(uintptr(args[0].Int())))
2018-11-06 20:16:33 +03:00
return nil
}))
}
var Global = js.Global()
var Module = Global.Call("eval", "Module")
//TODO: func MakeWrapper(i interface{}) *js.Value