Fix the rest of the enyo.Ajax instances to use new bind style
var req = new enyo.Ajax({
url: url
});
- req.response(function(inSender, inResponse) {
+ req.response(this, function(inSender, inResponse) {
this.bubble('onItemsLoaded', {
type: 'user',
username: username,
to: to,
entries: inResponse
});
- }.bind(this));
- req.error(function(inSender, inResponse) {
+ });
+ req.error(this, function(inSender, inResponse) {
if (inResponse == 404)
this.bubble('onUserNotFound');
else
this.bubble('onAPIError', {response: inResponse});
- }.bind(this));
+ });
req.go();
},
loadTagRecords: function(type, tag) {