bind of common helpers, Methods Webix Docs
objectthe object which the function will be bound to
| function | the bound function |
Example
var grid = webix.ui({
view:"datatable",
on:{
"onStoreUpdated":webix.bind(this.render, this)
}
});
//'this' refers to a datatable object
Details
Inside the function the this keyword becomes a reference to the object scope.
Function and component binding works as well during attaching the function with an attachEvent method:
grid.attachEvent("onStoreUpdated", webix.bind(this.render, this));
//'this' is still a grid object since attachEvent() is called from it