2017-05-24 20:07:50 +00:00
|
|
|
<html>
|
|
|
|
<body>
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
|
|
|
const {ipcRenderer} = require('electron')
|
2017-10-30 12:14:10 +00:00
|
|
|
const popup = window.open('http://127.0.0.1')
|
2017-05-24 20:07:50 +00:00
|
|
|
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>
|