Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at https://viewsourceconf.org

appShellService

Quitting Mozilla:

var Cc = Components.classes;
var Ci = Components.interfaces;
shell = Cc["@mozilla.org/appshell/appShellService;1"];
shell = shell.getService(Ci.nsIAppShellService);
shell.quit(3); // eForceQuit

Bam! There goes Mozilla.

Then again, there's a much easier way; One of the xpcshell extensions is a quit function:

quit(3)

Document Tags and Contributors

 Contributors to this page: Sheppy, groovecoder, Nickolay, LionKimbro
 Last updated by: Sheppy,