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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
398 B
JavaScript
Raw Normal View History

const { ipcRenderer, webFrame } = require('electron');
setImmediate(function () {
if (window.location.toString() === 'bar://page/') {
const windowOpenerIsNull = window.opener == null;
ipcRenderer.send('answer', {
nodeIntegration: webFrame.getWebPreference('nodeIntegration'),
typeofProcess: typeof global.process,
windowOpenerIsNull
});
window.close();
}
});