mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
Update execjs signature
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user