Skip to content

Commit

Permalink
invoke callback if defined
Browse files Browse the repository at this point in the history
  • Loading branch information
alixander committed Sep 29, 2023
1 parent f448ae1 commit f49a65b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions d2js/js.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ func main() {
js.Global().Set("d2Parse", js.FuncOf(jsParse))
js.Global().Set("d2Encode", js.FuncOf(jsEncode))
js.Global().Set("d2Decode", js.FuncOf(jsDecode))
initCallback := js.Global().Get("onWasmInitialized")
if !initCallback.IsUndefined() {
initCallback.Invoke()
}
select {}
}

Expand Down

0 comments on commit f49a65b

Please sign in to comment.