mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
Add specs for the beforeunload handler.
This commit is contained in:
12
spec/fixtures/api/beforeunload-false.html
vendored
Normal file
12
spec/fixtures/api/beforeunload-false.html
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<html>
|
||||
<body>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
window.onbeforeunload = function() {
|
||||
setImmediate(function() {
|
||||
require('remote').getCurrentWindow().emit('onbeforeunload');
|
||||
});
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user