emberjs/ember.js — pull request #544 by dgeb (2012-02-28 17:55:36+00:00)
Title: Stash view and context on event object in action handler

Event handlers should be consistent, whether they're set up as standard [event listeners for views](https://github.com/emberjs/ember.js/blob/master/packages/ember-views/lib/system/event_dispatcher.js#L36-73) or they're handlers for action helpers.

By stashing the `view` and `context` on the `event` object, we can pass `event` as the one and only argument to handlers for action helpers. This meta-data might prove useful if, say, a different view has been targeted than the current one.

For instance, the following action helper:

```
Edit
```

...could have this handler:

```
App.ListingView = Ember.View.extend({
templateName: 'listing',

editRow: function(event) {
event.view.set('isEditing', true);
}
});
```

I think this is much easier to remember and use than the order of the parameters currently passed: `view, event, context`.