- Chapter 2. Laying the foundation for your first desktop application
- from Cross-Platform Desktop Applications: Using Node, Electron, and NW.js
- Publisher: Manning Publications
- Released: May 2017
I think the condition app.on('window-all-closed' should be modified as:
if (process.platform === 'darwin') app.quit();
Leaving it as is, would immediately close the app on, say, Linux. While on Mac OS X closing all the windows would NOT close the app.
Share this highlighthttp://www.safaribooksonline.com/a/cross-platform-desktop-applications/12310668/