spec: Test beforeunload handler in webview

This commit is contained in:
Cheng Zhao 2015-05-01 13:48:23 +08:00
parent 817dfbdc27
commit 36d2512ff8
2 changed files with 28 additions and 0 deletions

View 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>