docs: clarify before `ready` usage (#41849)

This commit is contained in:
Erick Zhao 2024-04-15 07:38:58 -07:00 коммит произвёл GitHub
Родитель 734395bea9
Коммит 755f7d5ed0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -41,6 +41,10 @@ that was used to open the application, if it was launched from Notification Cent
You can also call `app.isReady()` to check if this event has already fired and `app.whenReady()`
to get a Promise that is fulfilled when Electron is initialized.
**Note**: The `ready` event is only fired after the main process has finished running the first
tick of the event loop. If an Electron API needs to be called before the `ready` event, ensure
that it is called synchronously in the top-level context of the main process.
### Event: 'window-all-closed'
Emitted when all windows have been closed.