electron/spec/fixtures/api/close-beforeunload-undefined.html
2019-07-02 13:48:58 -07:00

13 lines
287 B
HTML

<html>
<body>
<script type="text/javascript" charset="utf-8">
window.onbeforeunload = function() {
setTimeout(function() {
require('electron').remote.getCurrentWindow().emit('onbeforeunload');
}, 0);
}
window.onload = () => window.close();
</script>
</body>
</html>