Set WRTWindow constructor as BrowserWindow 78/213878/2
authorws29.jung <ws29.jung@samsung.com>
Mon, 16 Sep 2019 06:07:53 +0000 (15:07 +0900)
committerSangYong Park <sy302.park@samsung.com>
Tue, 17 Sep 2019 09:34:46 +0000 (09:34 +0000)
Inside electron, some functions use constructor to check if it is right object.
However, when condition checks BrowserWindow, WRTWindow object will rejected
even WRTWindow inherit BrowserWindow on C++ side.
This patch will overwrite WRTWindow constructor as BrowserWindow, so now on
WRTWindow will be handled as BrowserWindow.

Change-Id: I878844d4be0cc6a42be38d202a33a27523928f1c
Signed-off-by: ws29.jung <ws29.jung@samsung.com>
wrt_app/browser/wrt_window.js

index 80c2395..6917b69 100644 (file)
@@ -24,6 +24,7 @@ WRTWindow.prototype._init = function () {
   BrowserWindow.prototype._init.call(this)
   if (typeof this.setup === 'function')
     this.setup()
+  this.constructor = BrowserWindow
   let self = this
   this.webContents.on('new-window', (event, url, frameName, disposition, options) => {
     event.preventDefault()