Merge pull request #6115 from electron/load-extension-when-added

Call loadExtension from addDevToolsExtension
This commit is contained in:
Cheng Zhao 2016-06-19 10:55:45 +00:00 committed by GitHub
commit 31d619f748

View file

@ -352,6 +352,7 @@ app.once('ready', function () {
BrowserWindow.addDevToolsExtension = function (srcDirectory) {
const manifest = getManifestFromPath(srcDirectory)
if (manifest) {
loadExtension(manifest)
for (const webContents of getAllWebContents()) {
if (isWindowOrWebView(webContents)) {
loadDevToolsExtensions(webContents, [manifest])