diff --git a/cmds/mcla_wasm/js_globals.go b/cmds/mcla_wasm/js_globals.go index bb4ce1a..3cbefcc 100644 --- a/cmds/mcla_wasm/js_globals.go +++ b/cmds/mcla_wasm/js_globals.go @@ -19,6 +19,7 @@ var ( // function jsFetch = global.Get("fetch") // API + console = global.Get("console") caches = global.Get("caches") sessionStorage = global.Get("sessionStorage") localStorage = global.Get("localStorage") diff --git a/cmds/mcla_wasm/main.go b/cmds/mcla_wasm/main.go index 812a1dd..659c28a 100644 --- a/cmds/mcla_wasm/main.go +++ b/cmds/mcla_wasm/main.go @@ -58,7 +58,7 @@ func main() { }) global.Set("MCLA", api) - fmt.Printf(LICENSE, version) + console.Call("log", fmt.Sprintf(LICENSE, version)) defer fmt.Printf("MCLA-%s unloaded\n", version) <-bgCtx.Done()