electron/spec/fixtures/chromium/other-window.js

22 lines
366 B
JavaScript
Raw Normal View History

2020-03-20 20:28:31 +00:00
const { app, BrowserWindow } = require('electron');
2020-03-20 20:28:31 +00:00
const ints = (...args) => args.map(a => parseInt(a, 10));
2020-03-20 20:28:31 +00:00
const [x, y, width, height] = ints(...process.argv.slice(2));
2020-03-20 20:28:31 +00:00
let w;
app.whenReady().then(() => {
w = new BrowserWindow({
x,
y,
width,
height
2020-03-20 20:28:31 +00:00
});
console.log('__ready__');
});
process.on('SIGTERM', () => {
2020-03-20 20:28:31 +00:00
process.exit(0);
});