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

14 lines
398 B
JavaScript
Raw Normal View History

const { ipcRenderer, webFrame } = 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', {
nodeIntegration: webFrame.getWebPreference('nodeIntegration'),
typeofProcess: typeof global.process,
windowOpenerIsNull
});
2020-03-20 20:28:31 +00:00
window.close();
}
2020-03-20 20:28:31 +00:00
});