electron/spec/fixtures/pages/visibilitychange.html
2016-05-25 09:12:52 -07:00

11 lines
341 B
HTML

<html>
<body>
<script type="text/javascript" charset="utf-8">
const {ipcRenderer} = require('electron')
ipcRenderer.send('pong', document.visibilityState, document.hidden)
document.addEventListener('visibilitychange', function () {
ipcRenderer.send('pong', document.visibilityState, document.hidden)
})
</script>
</body>
</html>