docs: remove stale example and standardize DevTools capitalization (#49321)

* docs: remove stale example and standardize `DevTools` capitalization

* Update docs/api/web-contents.md

Co-authored-by: Kilian Valkhof <kilian@kilianvalkhof.com>

---------

Co-authored-by: Kilian Valkhof <kilian@kilianvalkhof.com>
This commit is contained in:
Erick Zhao
2026-01-14 01:35:53 -08:00
committed by GitHub
parent a368c5da0c
commit dae76c2885
8 changed files with 25 additions and 71 deletions

View File

@@ -1512,7 +1512,7 @@ will not work on non-persistent (in-memory) sessions.
* `options` Object (optional)
* `allowFileAccess` boolean - Whether to allow the extension to read local files over `file://`
protocol and inject content scripts into `file://` pages. This is required e.g. for loading
devtools extensions on `file://` URLs. Defaults to false.
DevTools extensions on `file://` URLs. Defaults to false.
Returns `Promise<Extension>` - resolves when the extension is loaded.
@@ -1538,7 +1538,7 @@ const path = require('node:path')
app.whenReady().then(async () => {
await session.defaultSession.loadExtension(
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.
{ allowFileAccess: true }
)
// Note that in order to use the React DevTools extension, you'll need to