|
@@ -49,6 +49,17 @@ BrowserWindow.prototype._init = function () {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ if (webContents.getLastWebPreferences().nodeIntegration === true) {
|
|
|
+ const message =
|
|
|
+ 'Enabling Node.js integration in child windows opened with the ' +
|
|
|
+ '"nativeWindowOpen" option will cause memory leaks, please turn off ' +
|
|
|
+ 'the "nodeIntegration" option.\\n' +
|
|
|
+ 'From 5.x child windows opened with the "nativeWindowOpen" option ' +
|
|
|
+ 'will always have Node.js integration disabled.\\n' +
|
|
|
+ 'See https://github.com/electron/electron/pull/15076 for more.'
|
|
|
+ this.webContents.executeJavaScript(`console.warn('${message}')`)
|
|
|
+ }
|
|
|
+
|
|
|
const { url, frameName } = urlFrameName
|
|
|
v8Util.deleteHiddenValue(webContents, 'url-framename')
|
|
|
const options = {
|