зеркало из https://github.com/electron/electron.git
20 строки
549 B
HTML
20 строки
549 B
HTML
<html>
|
|
<body>
|
|
<script type="text/javascript" charset="utf-8">
|
|
const {ipcRenderer} = require('electron')
|
|
const popup = window.open('http://127.0.0.1')
|
|
const intervalID = setInterval(function () {
|
|
try {
|
|
if (popup.location.toString() !== 'about:blank') {
|
|
clearInterval(intervalID)
|
|
ipcRenderer.send('answer', `Did not throw error accessing location: ${popup.location}`)
|
|
}
|
|
} catch (error) {
|
|
clearInterval(intervalID)
|
|
ipcRenderer.send('answer', error.message)
|
|
}
|
|
}, 10)
|
|
</script>
|
|
</body>
|
|
</html>
|