Usually you would want to use the beforeunload handler to decide whether thewindow should be closed, which will also be called when the window isreloaded. In Electron, returning any value other than undefined would cancel theclose. For example:
Usually you would want to use the beforeunload handler to decide whether thewindow should be closed, which will also be called when the window isreloaded. In Electron, returning any value other than undefined would cancel theclose. For example: