electron/spec/fixtures/pages/visibilitychange.html
loc 0b85fdf26c
feat: add webContents.setWindowOpenHandler API (#24517)
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2020-11-10 09:06:03 -08:00

13 lines
379 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 () {
setTimeout(() => {
ipcRenderer.send('pong', document.visibilityState, document.hidden)
}, 500);
})
</script>
</body>
</html>