From 8d234cc8429dbb7910d1d3cd5045ab2029e2ac42 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Thu, 14 Mar 2024 08:57:10 +1100 Subject: [PATCH] Update execjs signature --- v3/pkg/application/webview_window.go | 6 +++--- v3/pkg/application/window.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/v3/pkg/application/webview_window.go b/v3/pkg/application/webview_window.go index a8937505f19..5503c29b744 100644 --- a/v3/pkg/application/webview_window.go +++ b/v3/pkg/application/webview_window.go @@ -500,7 +500,7 @@ func (w *WebviewWindow) SetMaxSize(maxWidth, maxHeight int) Window { } // ExecJS executes the given javascript in the context of the window. -func (w *WebviewWindow) ExecJS(_callID, js string) { +func (w *WebviewWindow) ExecJS(js string) { if w.impl == nil && !w.isDestroyed() { return } @@ -657,7 +657,7 @@ func (w *WebviewWindow) HandleMessage(message string) { w.runtimeLoaded = true w.SetResizable(!w.options.DisableResize) for _, js := range w.pendingJS { - w.ExecJS("", js) + w.ExecJS(js) } } } @@ -1042,7 +1042,7 @@ func (w *WebviewWindow) SetFrameless(frameless bool) Window { func (w *WebviewWindow) DispatchWailsEvent(event *WailsEvent) { msg := fmt.Sprintf("_wails.dispatchWailsEvent(%s);", event.ToJSON()) - w.ExecJS("", msg) + w.ExecJS(msg) } func (w *WebviewWindow) dispatchWindowEvent(id uint) { diff --git a/v3/pkg/application/window.go b/v3/pkg/application/window.go index ce807944417..303a23df0ab 100644 --- a/v3/pkg/application/window.go +++ b/v3/pkg/application/window.go @@ -21,7 +21,7 @@ type Window interface { DispatchWailsEvent(event *WailsEvent) EnableSizeConstraints() Error(message string, args ...any) - ExecJS(callID, js string) + ExecJS(js string) Focus() ForceReload() Fullscreen() Window