window.open uses electron js logic when renderer was integrated with node.
(node is integrated in renderer when addon is enabled. and default webapp
do not use node in renderer side.). It has some compatibility issue.
so, use native window open always.
related:
https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/248981/
Change-Id: I8d786b2d9d1ba97796217f0b2cb2371e89b80479
Signed-off-by: SangYong Park <sy302.park@samsung.com>
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(),
};