fixes #244 -- allow View#events to be defined as a function, making it easier to call super.

This commit is contained in:
Jeremy Ashkenas
2011-08-03 16:41:49 -04:00
parent 10e71e3119
commit 6bb43c1b81
2 changed files with 3 additions and 2 deletions

View File

@@ -118,8 +118,8 @@ $(document).ready(function() {
var count = 0;
var ViewClass = Backbone.View.extend({
el: $('body'),
events: {
"fake$event.namespaced": "run"
events: function() {
return {"fake$event.namespaced": "run"};
},
run: function() {
count++;