diff --git a/lib/browser/guest-view-manager.js b/lib/browser/guest-view-manager.js index 58775669c2f4..28768fb128dc 100644 --- a/lib/browser/guest-view-manager.js +++ b/lib/browser/guest-view-manager.js @@ -183,10 +183,6 @@ var attachGuest = function (embedder, elementInstanceId, guestInstanceId, params blinkFeatures: params.blinkfeatures } - if (embedder.getWebPreferences().nodeIntegration === false) { - webPreferences.nodeIntegration = false - } - if (params.preload) { webPreferences.preloadURL = params.preload } diff --git a/spec/webview-spec.js b/spec/webview-spec.js index aca18a2de6c3..64f0eb5d5248 100644 --- a/spec/webview-spec.js +++ b/spec/webview-spec.js @@ -107,40 +107,6 @@ describe(' tag', function () { document.body.appendChild(webview) }) - it('disables node integration when disabled on the parent BrowserWindow', function (done) { - var b = undefined - - ipcMain.once('answer', function (event, typeofProcess) { - try { - assert.equal(typeofProcess, 'undefined') - done() - } finally { - b.close() - } - }) - - var windowUrl = require('url').format({ - pathname: `${fixtures}/pages/webview-no-node-integration-on-window.html`, - protocol: 'file', - query: { - p: `${fixtures}/pages/web-view-log-process.html` - }, - slashes: true - }) - var preload = path.join(fixtures, 'module', 'answer.js') - - b = new BrowserWindow({ - height: 400, - width: 400, - show: false, - webPreferences: { - preload: preload, - nodeIntegration: false, - } - }) - b.loadURL(windowUrl) - }) - it('disables node integration on child windows when it is disabled on the webview', function (done) { app.once('browser-window-created', function (event, window) { assert.equal(window.webContents.getWebPreferences().nodeIntegration, false)