mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
[v3] NewWebviewWindow* return *WebviewWindow
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user