feat: add force option to app.focus() (#22612)
This commit is contained in:
parent
75cef84877
commit
b724fbc0ed
5 changed files with 26 additions and 6 deletions
|
@ -554,11 +554,17 @@ Returns `Promise<void>` - fulfilled when Electron is initialized.
|
|||
May be used as a convenient alternative to checking `app.isReady()`
|
||||
and subscribing to the `ready` event if the app is not ready yet.
|
||||
|
||||
### `app.focus()`
|
||||
### `app.focus([options])`
|
||||
|
||||
* `options` Object (optional)
|
||||
* `steal` Boolean _macOS_ - Make the receiver the active app even if another app is
|
||||
currently active.
|
||||
|
||||
On Linux, focuses on the first visible window. On macOS, makes the application
|
||||
the active app. On Windows, focuses on the application's first window.
|
||||
|
||||
You should seek to use the `steal` option as sparingly as possible.
|
||||
|
||||
### `app.hide()` _macOS_
|
||||
|
||||
Hides all application windows without minimizing them.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue