electron/spec/fixtures/api/context-bridge/context-bridge-mutability/main.js
Samuel Attard 27c38bdead
build: add import/order eslint rule (#44107)
build: add import/order eslint rule (#44085)

* build: add import/order eslint rule

* chore: run lint:js --fix
2024-10-02 21:36:15 -07:00

21 lines
472 B
JavaScript

const { app, BrowserWindow } = require('electron');
const path = require('node:path');
let win;
app.whenReady().then(function () {
win = new BrowserWindow({
webPreferences: {
contextIsolation: true,
preload: path.join(__dirname, 'preload.js')
}
});
win.loadFile('index.html');
win.webContents.on('console-message', (event, level, message) => {
console.log(message);
});
win.webContents.on('did-finish-load', () => app.quit());
});