mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
[V3] setURL bug fix (#3533)
setURL bug fix s s Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
This commit is contained in:
parent
f16d1be955
commit
fc6f6bde1d
1 changed files with 4 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue