Adjust to the new behaviors of beforeunload handler

This commit is contained in:
Cheng Zhao 2016-05-23 13:28:16 +09:00
parent 06800940ec
commit fa0ce7ad5f
5 changed files with 8 additions and 29 deletions

View file

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

View file

@ -5,7 +5,6 @@
setTimeout(function() {
require('electron').remote.getCurrentWindow().emit('onbeforeunload');
}, 0);
return true;
}
window.close();
</script>