Adjust to the new behaviors of beforeunload handler
This commit is contained in:
parent
06800940ec
commit
fa0ce7ad5f
5 changed files with 8 additions and 29 deletions
13
spec/fixtures/api/close-beforeunload-string.html
vendored
13
spec/fixtures/api/close-beforeunload-string.html
vendored
|
@ -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>
|
|
@ -5,7 +5,6 @@
|
|||
setTimeout(function() {
|
||||
require('electron').remote.getCurrentWindow().emit('onbeforeunload');
|
||||
}, 0);
|
||||
return true;
|
||||
}
|
||||
window.close();
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue