etcher/tests/gui/allow-renderer-process-reuse.ts
Akis Kesoglou df7854111a Update to Electron 14
Change-type: minor
2023-02-14 13:42:29 +02:00

14 lines
335 B
TypeScript

// tslint:disable-next-line:no-var-requires
const { app } = require('electron');
if (app !== undefined) {
// tslint:disable-next-line:no-var-requires
const remoteMain = require('@electron/remote/main');
remoteMain.initialize();
app.on('browser-window-created', (_event, window) =>
remoteMain.enable(window.webContents),
);
}