mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 22:55:48 +01:00
[v3] NewWebviewWindow* return *WebviewWindow
This commit is contained in:
parent
2c3216ba36
commit
1c48d567e1
2 changed files with 3 additions and 3 deletions
|
|
@ -340,7 +340,7 @@ func (a *App) RegisterHook(eventType events.ApplicationEventType, callback func(
|
|||
}
|
||||
}
|
||||
|
||||
func (a *App) NewWebviewWindow() Window {
|
||||
func (a *App) NewWebviewWindow() *WebviewWindow {
|
||||
return a.NewWebviewWindowWithOptions(WebviewWindowOptions{})
|
||||
}
|
||||
|
||||
|
|
@ -376,7 +376,7 @@ func (a *App) error(message string, args ...any) {
|
|||
}
|
||||
}
|
||||
|
||||
func (a *App) NewWebviewWindowWithOptions(windowOptions WebviewWindowOptions) Window {
|
||||
func (a *App) NewWebviewWindowWithOptions(windowOptions WebviewWindowOptions) *WebviewWindow {
|
||||
newWindow := NewWindow(windowOptions)
|
||||
id := newWindow.ID()
|
||||
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ func (w *WebviewWindow) setupEventMapping() {
|
|||
}
|
||||
|
||||
// NewWindow creates a new window with the given options
|
||||
func NewWindow(options WebviewWindowOptions) Window {
|
||||
func NewWindow(options WebviewWindowOptions) *WebviewWindow {
|
||||
if options.Width == 0 {
|
||||
options.Width = 800
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue