mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
When user wants to close the window, the 'beforeunload' event would be called, then the closing would be cancelled and the 'window:close' command would be triggered. In the 'window:close' handler, a confirm dialog could be showed if there are unsaved contents, and if the window is really meant to be closed, the window would be tried to be closed again and this time 'beforeunload' handler wont't prevent it.