Search code examples
xulxulrunner

How to be notified before a xulrunner restart?


I'm using the Xulrunner Extensions Manager in my desktop application, and I would like to be notified before a restart. Is there a way?

(the window's onclose() methods will not work..)


Solution

  • You can add observers for the "quit-application-requested" or the "quit-application" notifications. The data parameter will be "restart" if this is a restart rather than a shutdown. (The notifications differ as to what the data parameter is for a shutdown; "quit-application-requested" passes null while "quit-application" passes "shutdown".)