mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
refactor: adapt remote module init for electron 16
This commit is contained in:
1 parent
de50d5b42c
commit
18cf972388
1 file changed
+4
-4
@@ -12,6 +12,7 @@ const args = process.argv.slice(1),
|
||||
|
||||
const api = new Api();
|
||||
contextMenu();
|
||||
require('@electron/remote/main').initialize();
|
||||
|
||||
function createWindow(): BrowserWindow {
|
||||
// Create the browser window.
|
||||
@@ -23,7 +24,6 @@ function createWindow(): BrowserWindow {
|
||||
nodeIntegration: true,
|
||||
allowRunningInsecureContent: serve ? true : false,
|
||||
contextIsolation: false,
|
||||
enableRemoteModule: true,
|
||||
webSecurity: false,
|
||||
},
|
||||
resizable: true,
|
||||
@@ -36,6 +36,8 @@ function createWindow(): BrowserWindow {
|
||||
title: 'IPTVnator',
|
||||
});
|
||||
|
||||
require('@electron/remote/main').enable(win.webContents);
|
||||
|
||||
if (serve) {
|
||||
win.webContents.openDevTools();
|
||||
win.loadURL('http://localhost:4200');
|
||||
@@ -73,7 +75,7 @@ function createEpgWorkerWindow() {
|
||||
show: false,
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
enableRemoteModule: true,
|
||||
contextIsolation: false,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -92,8 +94,6 @@ function createEpgWorkerWindow() {
|
||||
}
|
||||
|
||||
try {
|
||||
app.allowRendererProcessReuse = true;
|
||||
|
||||
// This method will be called when Electron has finished
|
||||
// initialization and is ready to create browser windows.
|
||||
// Some APIs can only be used after this event occurs.
|
||||
|
||||
Reference in new issue
Block a user