mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-26 16:27:18 +00:00
14 lines
335 B
TypeScript
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),
|
|
);
|
|
}
|