beforeunload-false.html 295 B

1234567891011121314
  1. <html>
  2. <body>
  3. <script type="text/javascript" charset="utf-8">
  4. window.onbeforeunload = function() {
  5. setTimeout(function() {
  6. var ipcRenderer = require('electron').ipcRenderer;
  7. ipcRenderer.sendToHost('onbeforeunload');
  8. }, 0);
  9. return false;
  10. }
  11. </script>
  12. </body>
  13. </html>