Return "this" reference

Return "this" is a good convention that allow to use chains.
This commit is contained in:
Dmytro Nemoga
2013-01-24 18:40:58 +02:00
parent be45a320e5
commit fee896725e

View File

@@ -1318,6 +1318,7 @@
this.$el.on(eventName, selector, method);
}
}
return this;
},
// Clears all callbacks previously bound to the view with `delegateEvents`.
@@ -1325,6 +1326,7 @@
// Backbone views attached to the same DOM element.
undelegateEvents: function() {
this.$el.off('.delegateEvents' + this.cid);
return this;
},
// Performs the initial configuration of a View with a set of options.