mirror of
https://github.com/electron/electron.git
synced 2026-02-07 21:55:48 -05:00
16 lines
522 B
JavaScript
16 lines
522 B
JavaScript
const { ipcRenderer, webFrame } = require('electron');
|
|
|
|
setImmediate(function () {
|
|
if (window.location.toString() === 'bar://page/') {
|
|
const windowOpenerIsNull = window.opener == null;
|
|
ipcRenderer.send('answer', {
|
|
nativeWindowOpen: webFrame.getWebPreference('nativeWindowOpen'),
|
|
nodeIntegration: webFrame.getWebPreference('nodeIntegration'),
|
|
sandbox: webFrame.getWebPreference('sandbox'),
|
|
typeofProcess: typeof global.process,
|
|
windowOpenerIsNull
|
|
});
|
|
window.close();
|
|
}
|
|
});
|