Add "app.whenReady()" (#12652)

* Make "chai-as-promised" avaialble in tests

* Add "app.whenReady()"

Closes #9561.
This commit is contained in:
Alexey Kuzmin 2018-04-20 09:09:23 +02:00 committed by Samuel Attard
parent c7a0b419a9
commit fcc82ebd35
4 changed files with 41 additions and 0 deletions

View file

@ -432,6 +432,12 @@ app.exit(0)
Returns `Boolean` - `true` if Electron has finished initializing, `false` otherwise.
### `app.whenReady()`
Returns `Promise` - 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()`
On Linux, focuses on the first visible window. On macOS, makes the application