how to use .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: javascript bind this syntax
func.bind(this)
Example 3: bind (this)
this.getView().addEventDelegate({
onBeforeFirstShow: function() {
// Some codes
}.bind(this)
});