electron/spec/fixtures/pages/visibilitychange.html

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
379 B
HTML
Raw Normal View History

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