electron/spec/fixtures/api/close-beforeunload-true.html
Cheng Zhao f17864372e Use setTimeout instead of setImmediate in fixtures.
The setImmediate is implemented in node and may have unexpected affects.
2013-09-02 16:46:08 +08:00

14 lines
273 B
HTML

<html>
<body>
<script type="text/javascript" charset="utf-8">
window.onbeforeunload = function() {
setTimeout(function() {
require('remote').getCurrentWindow().emit('onbeforeunload');
}, 0);
return true;
}
window.close();
</script>
</body>
</html>