Mojo.Event.stageDeactivate
From WebOS101
Mojo.Event.stageDeactivate - A stageDeactivate event is generated when a stage is no longer active and potentially receiving the user's attention. For card stages, this is when the stage is minimized. The event is sent to the top scene, and bubbles up to the stage's document
setup: function() {
this.minimizeHandler = this.minimized.bind(this);
this.controller.listen(this.controller.stageController.document, Mojo.Event.stageDeactivate, this.minimizeHandler);
},
minimized: function(event) {
// card was minimized, do your stuff!
// pause game?
},
cleanup: function() {
this.controller.stopListening(this.controller.stageController.document, Mojo.Event.stageDeactivate, this.minimizeHandler);
}

