Merge "Using native window open" into tizen submit/tizen/20210120.160025
authorBot Blink <blinkbot@samsung.com>
Wed, 20 Jan 2021 03:33:33 +0000 (03:33 +0000)
committerGerrit Code Review <gerrit@review>
Wed, 20 Jan 2021 03:33:33 +0000 (03:33 +0000)
wrt_app/browser/wrt_window.ts
wrt_app/src/web_application.ts

index 2ac5a14..ebb7423 100644 (file)
@@ -29,14 +29,13 @@ WRTWindow.prototype._init = function () {
   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);
     }
index dee5636..a48dfa2 100644 (file)
@@ -247,7 +247,8 @@ export class WebApplication {
       show: false,
       webPreferences: {
         nodeIntegration: options.isAddonAvailable,
-        nodeIntegrationInWorker: false
+        nodeIntegrationInWorker: false,
+        nativeWindowOpen: true,
       },
       webContents: WRTWebContents.create(),
     };