if (typeof this.setup === 'function')
this.setup();
this.constructor = BrowserWindow;
- let self = this;
this.webContents.on('new-window', (event: Electron.NewWindowWebContentsEvent,
url: string,
frameName: string,
disposition: ('default' | 'foreground-tab' | 'background-tab' | 'new-window' | 'save-to-disk' | 'other'),
options: any) => {
event.preventDefault();
- if (!options.webContents || options.webContents === self) {
+ if (!options.webContents) {
options.webContents = WRTWebContents.create();
options.webContents.loadURL(url);
}
show: false,
webPreferences: {
nodeIntegration: options.isAddonAvailable,
- nodeIntegrationInWorker: false
+ nodeIntegrationInWorker: false,
+ nativeWindowOpen: true,
},
webContents: WRTWebContents.create(),
};