{"issue":{"title":"View Event Callbacks as Functions","user":{"login":"zowens","id":187426,"url":"https://api.github.com/users/zowens","gravatar_id":"94b6f07dca54e7752711e3189981626e","avatar_url":"https://secure.gravatar.com/avatar/94b6f07dca54e7752711e3189981626e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"created_at":"2011-12-25T05:09:55Z","milestone":null,"state":"closed","updated_at":"2011-12-26T16:51:53Z","labels":[],"id":2654396,"closed_at":"2011-12-26T06:48:04Z","html_url":"https://github.com/documentcloud/backbone/issues/815","pull_request":{"patch_url":"https://github.com/documentcloud/backbone/pull/815.patch","html_url":"https://github.com/documentcloud/backbone/pull/815","diff_url":"https://github.com/documentcloud/backbone/pull/815.diff"},"body":"Sometimes it can be useful to define events in terms of functions instead of simply the name of a function on the view. This pull request basically just allows one to define functions for the callbacks instead of the clunky string. \r\n\r\n\r\n```javascript\r\nvar myView = Backbone.View.extend({\r\n   events: {\r\n      'click': function() { alert(\"clicked\"); },\r\n      'mousedown': this.mouseMove\r\n   }\r\n});\r\n```","number":815,"url":"https://api.github.com/repos/documentcloud/backbone/issues/815","comments":5,"assignee":null},"comment":{"user":{"login":"zowens","id":187426,"url":"https://api.github.com/users/zowens","gravatar_id":"94b6f07dca54e7752711e3189981626e","avatar_url":"https://secure.gravatar.com/avatar/94b6f07dca54e7752711e3189981626e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"created_at":"2011-12-26T16:51:53Z","updated_at":"2011-12-26T16:51:53Z","id":3275527,"body":"@shesek This is true... I noticed that after I posted it. ","url":"https://api.github.com/repos/documentcloud/backbone/issues/comments/3275527"},"action":"created"}