electron/spec-main/fixtures/api/close-beforeunload-false.html

15 lines
326 B
HTML

<html>
<body>
<script type="text/javascript" charset="utf-8">
// Only prevent unload on the first window close
var unloadPrevented = false;
window.onbeforeunload = function() {
if (!unloadPrevented) {
unloadPrevented = true;
console.log('prevent')
return false;
}
}
</script>
</body>
</html>