mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
docs: update example to use app.whenReady() (#38337)
* docs: update example to use app.whenReady() * docs: retain async
This commit is contained in:
@@ -1390,7 +1390,7 @@ extension to be loaded.
|
||||
const { app, session } = require('electron')
|
||||
const path = require('path')
|
||||
|
||||
app.on('ready', async () => {
|
||||
app.whenReady().then(async () => {
|
||||
await session.defaultSession.loadExtension(
|
||||
path.join(__dirname, 'react-devtools'),
|
||||
// allowFileAccess is required to load the devtools extension on file:// URLs.
|
||||
|
||||
Reference in New Issue
Block a user