Add suspend and resume methods.

This commit is contained in:
Michael Teeuw
2016-05-11 13:49:40 +02:00
parent 405a81c8f0
commit c4f3009bb5
2 changed files with 29 additions and 1 deletions

View File

@@ -208,6 +208,13 @@ socketNotificationReceived: function(notification, payload) {
},
````
####`suspend()`
When a module is hidden (using the `module.hide()` method), the `suspend()` method will be called. By subclassing this method you can perform tasks like halting the update timers.
####`resume()`
When a module will be shown after it was previously hidden (using the `module.show()` method), the `resume()` method will be called. By subclassing this method you can perform tasks restarting the update timers.
### Module instance methods
Each module instance has some handy methods which can be helpfull building your module.