mirror of
https://ark.sudovanilla.org/Korbs/electron-tabs.git
synced 2024-12-23 03:53:53 +00:00
Remove nodeIntegration requirement
This commit is contained in:
parent
b84d2a9553
commit
fad70427d5
10
demo/app.js
10
demo/app.js
|
@ -1,16 +1,14 @@
|
||||||
const electron = require('electron');
|
const electron = require("electron");
|
||||||
const app = electron.app;
|
const app = electron.app;
|
||||||
|
|
||||||
app.on('ready', function () {
|
app.on("ready", function () {
|
||||||
const mainWindow = new electron.BrowserWindow({
|
const mainWindow = new electron.BrowserWindow({
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
nodeIntegration: true,
|
|
||||||
contextIsolation: false,
|
|
||||||
webviewTag: 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();
|
||||||
mainWindow.focus();
|
mainWindow.focus();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue