From 348ec6839a97720c13563e2f37685b06045296b0 Mon Sep 17 00:00:00 2001 From: Bhuvan Sankar Andela <61649925+NrdyBhu1@users.noreply.github.com> Date: Tue, 28 May 2024 18:43:40 +0530 Subject: [PATCH] Update js_wasm.go Added an alert function. This can be useful in debugging along with other stuff --- pkg/app/js_wasm.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/app/js_wasm.go b/pkg/app/js_wasm.go index ebd05181..c04c4ccc 100644 --- a/pkg/app/js_wasm.go +++ b/pkg/app/js_wasm.go @@ -256,6 +256,10 @@ func newBrowserWindow() *browserWindow { return &browserWindow{value: value{jsValue: js.Global()}} } +func (w *browserWindow) Alert(alertMessage string) { + w.Call("alert", alertMessage) +} + func (w *browserWindow) URL() *url.URL { rawurl := w. Get("location").