add options nodeIntegration,webviewTag into the demo

This commit is contained in:
KATO Kanryu 2019-09-21 23:01:46 +09:00
parent 1bfb560b0a
commit ea8a21f9ba

View file

@ -6,7 +6,12 @@ app.setName('electron-tabs-demo');
app.on('ready', function () { app.on('ready', function () {
const mainWindow = new electron.BrowserWindow(); const mainWindow = new electron.BrowserWindow({
webPreferences: {
nodeIntegration: true,
webviewTag: true
}
});
mainWindow.loadURL('file://' + __dirname + '/electron-tabs.html'); mainWindow.loadURL('file://' + __dirname + '/electron-tabs.html');
mainWindow.on('ready-to-show', function () { mainWindow.on('ready-to-show', function () {
mainWindow.show(); mainWindow.show();