Remove nodeIntegration requirement

This commit is contained in:
Thomas Brouard 2022-05-23 19:17:06 +02:00
parent b84d2a9553
commit fad70427d5

View file

@ -1,16 +1,14 @@
const electron = require('electron');
const electron = require("electron");
const app = electron.app;
app.on('ready', function () {
app.on("ready", function () {
const mainWindow = new electron.BrowserWindow({
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
webviewTag: true
}
});
mainWindow.loadURL('file://' + __dirname + '/electron-tabs.html');
mainWindow.on('ready-to-show', function () {
mainWindow.loadURL("file://" + __dirname + "/electron-tabs.html");
mainWindow.on("ready-to-show", function () {
mainWindow.show();
mainWindow.focus();
});