What is the most correct way of using Bind. I have used like this and it is working but interested in finding the best possible option
ObjectProcessor = function (pathList) {
this.data = null;
}
ObjectProcessor.prototype = {
callServer: function () {
ajaxObject.Get("api/Path", this.callReceive.bind(this), null, this.callError.bind(this), this.callComplete.bind(this));
},
callReceive: function (source) {
this.data = source;
},
callComplete: function (source) {
// do something
},
callError: function (source) {
// Show Error
}
};