invoke callback if defined
This commit is contained in:
parent
b5179d989f
commit
50f01f3fc3
1 changed files with 4 additions and 0 deletions
|
|
@ -26,6 +26,10 @@ func main() {
|
||||||
js.Global().Set("d2Parse", js.FuncOf(jsParse))
|
js.Global().Set("d2Parse", js.FuncOf(jsParse))
|
||||||
js.Global().Set("d2Encode", js.FuncOf(jsEncode))
|
js.Global().Set("d2Encode", js.FuncOf(jsEncode))
|
||||||
js.Global().Set("d2Decode", js.FuncOf(jsDecode))
|
js.Global().Set("d2Decode", js.FuncOf(jsDecode))
|
||||||
|
initCallback := js.Global().Get("onWasmInitialized")
|
||||||
|
if !initCallback.IsUndefined() {
|
||||||
|
initCallback.Invoke()
|
||||||
|
}
|
||||||
select {}
|
select {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue