You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -57,13 +56,17 @@ const all = windowManager.getAll()
57
56
58
57
## API Reference
59
58
59
+
### Types
60
+
61
+
-**Window** - A union type of `StatefulWindow` and common `BrowserWindow`. When `storageKey` option is provided, returns `StatefulWindow`; otherwise returns `BrowserWindow`.
62
+
60
63
### `new WindowManager()`
61
64
62
65
Creates a new WindowManager instance.
63
66
64
67
### `windowManager.create(options)`
65
68
66
-
Creates and manages a new BrowserWindow.
69
+
Creates and manages a new window.
67
70
68
71
-**options**`Object` - Configuration for the window:
69
72
-**name**`string` - Window identifier, used by `get()`. Default: `'anonymous'`
@@ -77,23 +80,23 @@ Creates and manages a new BrowserWindow.
77
80
-**storagePath**`string` - Custom storage path for window state file
78
81
-**globalUserAgent**`string` - Custom User-Agent for all `loadURL` calls in this window
79
82
80
-
Returns: `BrowserWindow`
83
+
Returns: `Window` (`BrowserWindow` or `StatefulWindow`)
81
84
82
85
### `windowManager.get(name)`
83
86
84
87
Get a managed window by name.
85
88
86
89
-**name**`string` - Window name
87
90
88
-
Returns: `BrowserWindow | undefined`
91
+
Returns: `Window | undefined`
89
92
90
93
### `windowManager.getById(id)`
91
94
92
95
Get a managed window by Electron window id.
93
96
94
97
-**id**`number` - Window id
95
98
96
-
Returns: `BrowserWindow | undefined`
99
+
Returns: `Window | undefined`
97
100
98
101
### `windowManager.getAll()`
99
102
@@ -120,7 +123,7 @@ Static method. Set global user agent for all windows.
0 commit comments