Hi i have the following code in my template:
<div {{action "play" this target="view"}}>{{title}}</div>
and the following code in my view:
MB3.PlaylistView = Ember.View.extend({
play: function(event) {
}
});
the parameter event passed to the play function is now the playlist model (passed as “this” in the action helper shown above)
In Ember-pre2 the parameter passed to the action handler recieved the browser event with attributes like currentTarget etc. and a property context where the model was in.
How can i access the native event’s parameters like currentTarget in ember-pre4?
There is a lot of discussion on this ticket as well:
https://github.com/emberjs/ember.js/issues/1684
The recommended solution would be to create a custom view and then define a click handler. The click handler will be passed the event as the first argument.