javacsript bind code example
Example 1: bind in javascript
bind() returns a bound function that, when executed later, will have the correct context ("this") for calling the original function.
Example 2: bind (this)
this.getView().addEventDelegate({
onBeforeFirstShow: function() {
// Some codes
}.bind(this)
});