docs: update example to use app.whenReady() (#38337)
* docs: update example to use app.whenReady() * docs: retain async
This commit is contained in:
parent
683235daf0
commit
a22635bd9f
1 changed files with 1 additions and 1 deletions
|
@ -1390,7 +1390,7 @@ extension to be loaded.
|
||||||
const { app, session } = require('electron')
|
const { app, session } = require('electron')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
|
||||||
app.on('ready', async () => {
|
app.whenReady().then(async () => {
|
||||||
await session.defaultSession.loadExtension(
|
await session.defaultSession.loadExtension(
|
||||||
path.join(__dirname, 'react-devtools'),
|
path.join(__dirname, 'react-devtools'),
|
||||||
// allowFileAccess is required to load the devtools extension on file:// URLs.
|
// allowFileAccess is required to load the devtools extension on file:// URLs.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue