Skip to content

Commit

Permalink
Update execjs signature
Browse files Browse the repository at this point in the history
  • Loading branch information
leaanthony committed Mar 13, 2024
1 parent e680570 commit 8d234cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions v3/pkg/application/webview_window.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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)
}
}
}
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion v3/pkg/application/window.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8d234cc

Please sign in to comment.