2017-05-24 20:07:50 +00:00
|
|
|
<html>
|
|
|
|
<body>
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
|
|
|
const {ipcRenderer} = require('electron')
|
|
|
|
const popup = window.open('http://host')
|
|
|
|
const intervalID = setInterval(function () {
|
|
|
|
try {
|
|
|
|
if (popup.location.toString() !== 'about:blank') {
|
|
|
|
clearInterval(intervalID)
|
2017-05-25 16:39:40 +00:00
|
|
|
ipcRenderer.send('answer', `Did not throw error accessing location: ${popup.location}`)
|
2017-05-24 20:07:50 +00:00
|
|
|
}
|
|
|
|
} catch (error) {
|
|
|
|
clearInterval(intervalID)
|
|
|
|
ipcRenderer.send('answer', error.message)
|
|
|
|
}
|
|
|
|
}, 10)
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|