electron/spec/fixtures/api/close-beforeunload-true.html
2015-11-12 20:29:30 +08:00

14 lines
282 B
HTML

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