spec: Test beforeunload handler in webview
This commit is contained in:
parent
817dfbdc27
commit
36d2512ff8
2 changed files with 28 additions and 0 deletions
13
spec/fixtures/pages/beforeunload-false.html
vendored
Normal file
13
spec/fixtures/pages/beforeunload-false.html
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
<html>
|
||||
<body>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
window.onbeforeunload = function() {
|
||||
setTimeout(function() {
|
||||
var ipc = require('ipc');
|
||||
ipc.sendToHost('onbeforeunload');
|
||||
}, 0);
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue