diff options
author | hyunduk.kim <hyunduk.kim@samsung.com> | 2020-04-08 17:54:42 +0900 |
---|---|---|
committer | hyunduk.kim <hyunduk.kim@samsung.com> | 2020-04-08 17:54:42 +0900 |
commit | f2491b13996b07e529a06cb6053056c4b192204e (patch) | |
tree | dc77c0df529d3c2f8e2c584933ec892a3258df2b | |
parent | 9a743a9a434744f6b68fb6dd7c6e2972599f7339 (diff) | |
download | webapp-addon-setting-f2491b13996b07e529a06cb6053056c4b192204e.tar.gz webapp-addon-setting-f2491b13996b07e529a06cb6053056c4b192204e.tar.bz2 webapp-addon-setting-f2491b13996b07e529a06cb6053056c4b192204e.zip |
Add the option to enable node integration in BrowserWindow
To use node in renderer in case of electron app in m76,
nodeIntegration must be set as true explicitly
when creating an instance of BrowserWindow.
Change-Id: I362126f9f2702c917bc94f802f2097665a14f380
Signed-off-by: hyunduk.kim <hyunduk.kim@samsung.com>
-rwxr-xr-x | main.js | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -21,7 +21,13 @@ app.on('window-all-closed', function() { app.on('ready', function() { console.log('ready'); // Create the browser window. - mainWindow = new BrowserWindow({width: 800, height: 600}); + mainWindow = new BrowserWindow({ + width: 800, + height: 600, + webPreferences: { + nodeIntegration: true + } + }); // and load the index.html of the app. mainWindow.loadURL('file://' + __dirname + '/index.html'); |