mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
chore: deprecate nativeWindowOpen in Electron 17 (#32116)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { app, ipcMain, session, webFrameMain } from 'electron/main';
|
||||
import { app, ipcMain, session, deprecate, webFrameMain } from 'electron/main';
|
||||
import type { BrowserWindowConstructorOptions, LoadURLOptions } from 'electron/main';
|
||||
|
||||
import * as url from 'url';
|
||||
@@ -734,6 +734,11 @@ WebContents.prototype._init = function () {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
const prefs = this.getLastWebPreferences() || {};
|
||||
if (prefs.nativeWindowOpen === false) {
|
||||
deprecate.log('Deprecation Warning: Disabling nativeWindowOpen is deprecated. The nativeWindowOpen option will be removed in Electron 18.');
|
||||
}
|
||||
}
|
||||
|
||||
this.on('login', (event, ...args) => {
|
||||
|
||||
Reference in New Issue
Block a user