Lock to prevent multiple parallel executions of the beforeunload
listener.
Notify the browser that we do not want to unload.
Notes:
The beforeunload event
When preventing beforeunload
on Electron, no popup is shown.
This method implements a modal to ask the user if he wants to quit the page.
Updates the window zoom level based on the preference value.
Close the window right away when
true
, else check if we can unload.