[V3] setURL bug fix (#3533)

setURL bug fix

s

s

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
This commit is contained in:
Atterpac 2024-10-10 02:45:07 -06:00 committed by GitHub
commit fc6f6bde1d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,6 +11,7 @@ import (
"github.com/leaanthony/u"
"github.com/samber/lo"
"github.com/wailsapp/wails/v3/internal/assetserver"
"github.com/wailsapp/wails/v3/pkg/events"
)
@ -432,10 +433,11 @@ func (w *WebviewWindow) Hide() Window {
}
func (w *WebviewWindow) SetURL(s string) Window {
w.options.URL = s
url, _ := assetserver.GetStartURL(s)
w.options.URL = url
if w.impl != nil {
InvokeSync(func() {
w.impl.setURL(s)
w.impl.setURL(url)
})
}
return w