mirror of
https://github.com/jashkenas/backbone.git
synced 2026-04-30 03:00:06 -04:00
Refactor example code in View#events docs
This commit is contained in:
@@ -2957,7 +2957,9 @@ var InputView = Backbone.View.extend({
|
||||
render: function() { ... },
|
||||
|
||||
keyAction: function(e) {
|
||||
if (e.which === ENTER_KEY) this.collection.add({text: this.$el.val()});
|
||||
if (e.which === ENTER_KEY) {
|
||||
this.collection.add({text: this.$el.val()});
|
||||
}
|
||||
}
|
||||
});
|
||||
</pre>
|
||||
|
||||
Reference in New Issue
Block a user