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

10 lines
293 B
JavaScript
Raw Normal View History

2018-09-13 16:10:51 +00:00
const { ipcRenderer } = require('electron')
setImmediate(function () {
if (window.location.toString() === 'bar://page/') {
const windowOpenerIsNull = window.opener == null
ipcRenderer.send('answer', process.argv, typeof global.process, windowOpenerIsNull)
window.close()
}
})