Add specs for the beforeunload handler.
This commit is contained in:
parent
e423f601c0
commit
cfb957a603
5 changed files with 91 additions and 3 deletions
13
spec/fixtures/api/close-beforeunload-string.html
vendored
Normal file
13
spec/fixtures/api/close-beforeunload-string.html
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
<html>
|
||||
<body>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
window.onbeforeunload = function() {
|
||||
setImmediate(function() {
|
||||
require('remote').getCurrentWindow().emit('onbeforeunload');
|
||||
});
|
||||
return 'string';
|
||||
}
|
||||
window.close();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue