Powered By Olvy

Web App → Desktop App converter
13 April 2022

app.quit

You can quit the app programmatically by calling window.todesktop.app.quit()

Event listener for when the main app window is hidden

On Mac, when you close the main window, we hide the main window instead of destroying it. This allows us to show the window quickly when a user click's the dock icon. However, you may want slightly different behaviour. Now you can listen to the main-window-hide event and decide what you want to do when the event is triggered.

For example, you may want to combine the two APIs and quit the app when the main window is hidden

const hasNewToDesktopAPIs = window.todesktop && window.todesktop.app.quit;

if (hasNewToDesktopAPIs) {
  window.todesktop.on("main-window-hide", () => {
    window.todesktop.app.quit();
  });
}

Fixes

  • Files installed via MSI will no longer auto update

Share