electron/spec/fixtures/api/close-beforeunload-string.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

13 lines
276 B
HTML

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