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: I13126b22c843c177821c4670d6969bf8425e9251
Signed-off-by: hyunduk.kim <hyunduk.kim@samsung.com>
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');