mirror of
https://github.com/mileswolfallen2/gelectron.git
synced 2026-12-03 23:53:26 +00:00
23 lines
570 B
JavaScript
23 lines
570 B
JavaScript
const { app, BrowserWindow } = require('electron');
|
|
const path = require('path');
|
|
|
|
const isGelectron = !!(process.versions.gelectron || process.env.GELECTRON_NATIVE);
|
|
|
|
app.whenReady().then(() => {
|
|
const win = new BrowserWindow({
|
|
width: 680,
|
|
height: 720,
|
|
show: true,
|
|
title: (isGelectron ? 'Gelectron' : 'Electron') + ' Benchmark',
|
|
webPreferences: {
|
|
contextIsolation: false,
|
|
nodeIntegration: true,
|
|
sandbox: false,
|
|
},
|
|
});
|
|
|
|
win.loadFile(path.join(__dirname, 'index.html'));
|
|
});
|
|
|
|
app.on('window-all-closed', () => app.quit());
|