-
Notifications
You must be signed in to change notification settings - Fork 47
Lifecyles
Andy edited this page Mar 4, 2016
·
1 revision
Lifecyles are an integral part of your application and are executed at different point of the applications lifetime.
Executed when your application is initialized for the first time. Usually you add your DOM elements here.
Example:
created: function() {
this.label = $("<label/>").html("Hello World").appendTo(this.canvas);
},
Executed when your application receives the focus, e.g. the user has selected your application from the Menu or the application regains focus after the user hits the back
button.
Example:
focused: function() {
this.label.html("Got the focus");
}
Executed when the application loses the focus.
Example:
lost: function() {
this.lable.html("");
}