feat: add BrowserWindow.isSnapped()
(#46079)
* feat: add BrowserWindow.isSnapped() on Windows * docs: mark _Readonly_
This commit is contained in:
parent
47cf4e7bfd
commit
9ec14b91e7
8 changed files with 52 additions and 0 deletions
|
@ -511,6 +511,10 @@ A `string` property that defines an alternative title provided only to
|
|||
accessibility tools such as screen readers. This string is not directly
|
||||
visible to users.
|
||||
|
||||
#### `win.snapped` _Windows_ _Readonly_
|
||||
|
||||
A `boolean` property that indicates whether the window is arranged via [Snap.](https://support.microsoft.com/en-us/windows/snap-your-windows-885a9b1e-a983-a3b1-16cd-c531795e6241)
|
||||
|
||||
### Instance Methods
|
||||
|
||||
Objects created with `new BaseWindow` have the following instance methods:
|
||||
|
@ -1264,6 +1268,13 @@ Sets whether the menu bar should be visible. If the menu bar is auto-hide, users
|
|||
|
||||
Returns `boolean` - Whether the menu bar is visible.
|
||||
|
||||
#### `win.isSnapped()` _Windows_
|
||||
|
||||
Returns `boolean` - whether the window is arranged via [Snap.](https://support.microsoft.com/en-us/windows/snap-your-windows-885a9b1e-a983-a3b1-16cd-c531795e6241)
|
||||
|
||||
The window is snapped via buttons shown when the mouse is hovered over window
|
||||
maximize button, or by dragging it to the edges of the screen.
|
||||
|
||||
#### `win.setVisibleOnAllWorkspaces(visible[, options])` _macOS_ _Linux_
|
||||
|
||||
* `visible` boolean
|
||||
|
|
|
@ -611,6 +611,10 @@ A `string` property that defines an alternative title provided only to
|
|||
accessibility tools such as screen readers. This string is not directly
|
||||
visible to users.
|
||||
|
||||
#### `win.snapped` _Windows_ _Readonly_
|
||||
|
||||
A `boolean` property that indicates whether the window is arranged via [Snap.](https://support.microsoft.com/en-us/windows/snap-your-windows-885a9b1e-a983-a3b1-16cd-c531795e6241)
|
||||
|
||||
### Instance Methods
|
||||
|
||||
Objects created with `new BrowserWindow` have the following instance methods:
|
||||
|
@ -1445,6 +1449,13 @@ Sets whether the menu bar should be visible. If the menu bar is auto-hide, users
|
|||
|
||||
Returns `boolean` - Whether the menu bar is visible.
|
||||
|
||||
#### `win.isSnapped()` _Windows_
|
||||
|
||||
Returns `boolean` - whether the window is arranged via [Snap.](https://support.microsoft.com/en-us/windows/snap-your-windows-885a9b1e-a983-a3b1-16cd-c531795e6241)
|
||||
|
||||
The window is snapped via buttons shown when the mouse is hovered over window
|
||||
maximize button, or by dragging it to the edges of the screen.
|
||||
|
||||
#### `win.setVisibleOnAllWorkspaces(visible[, options])` _macOS_ _Linux_
|
||||
|
||||
* `visible` boolean
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue