1 Reply Latest reply on Aug 4, 2008 5:49 AM by mjr81

    Detecting when system is shutting down


      I need to be able to save my html/js applications state when the system stops the app because the system is about to shut down. How could I detect this event?


        • 1. Re: Detecting when system is shutting down
          I think the only way you can detect a "shutdown" is the application shutting down... the OS should close the app before shutting down. In that case, you may need to just have some application shut-down handlers. In javascript this would be something akin to:

          window.nativeWindow.addEventListener("closing", onWindowClose);

          function onWindowClose(){
          //Application closing functionality goes here;