Merge pull request #6115 from electron/load-extension-when-added
Call loadExtension from addDevToolsExtension
This commit is contained in:
commit
31d619f748
1 changed files with 1 additions and 0 deletions
|
@ -352,6 +352,7 @@ app.once('ready', function () {
|
||||||
BrowserWindow.addDevToolsExtension = function (srcDirectory) {
|
BrowserWindow.addDevToolsExtension = function (srcDirectory) {
|
||||||
const manifest = getManifestFromPath(srcDirectory)
|
const manifest = getManifestFromPath(srcDirectory)
|
||||||
if (manifest) {
|
if (manifest) {
|
||||||
|
loadExtension(manifest)
|
||||||
for (const webContents of getAllWebContents()) {
|
for (const webContents of getAllWebContents()) {
|
||||||
if (isWindowOrWebView(webContents)) {
|
if (isWindowOrWebView(webContents)) {
|
||||||
loadDevToolsExtensions(webContents, [manifest])
|
loadDevToolsExtensions(webContents, [manifest])
|
||||||
|
|
Loading…
Reference in a new issue