From c79a5e558c7f4ba38c645d998c69cb5084d37ee7 Mon Sep 17 00:00:00 2001 From: zyxkad Date: Mon, 15 Jan 2024 22:35:50 -0700 Subject: [PATCH] fix start log --- cmds/mcla_wasm/js_globals.go | 1 + cmds/mcla_wasm/main.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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()