electron/spec/fixtures/api/window-open-preload.js

10 lines
298 B
JavaScript
Raw Normal View History

2020-03-20 20:28:31 +00:00
const { ipcRenderer } = require('electron');
setImmediate(function () {
if (window.location.toString() === 'bar://page/') {
2020-03-20 20:28:31 +00:00
const windowOpenerIsNull = window.opener == null;
ipcRenderer.send('answer', process.argv, typeof global.process, windowOpenerIsNull);
window.close();
}
2020-03-20 20:28:31 +00:00
});