You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Load native UI libraryvargui=require('nw.gui');// Print argumentsconsole.log(gui.App.argv);// Quit current appgui.App.quit();
Reference
argv
Get the command line arguments when starting the app.
closeAllWindows()
Available after node-webkit v0.3.2
Send the close event to all windows of current app, if no window is blocking the close event, then the app will quit after all windows have done shutdown. Use this method to quit an app will give windows a chance to save data.
quit()
Quit current app. This method will not send close event to windows and app will just quit quietly.
Events
Following events can be listened by using App.on() function, for more information on how to receive events, you can visit EventEmitter.
open
Available after node-webkit v0.3.2
Emitted when users opened a file with your app. For more on this, see Handling files.