Reputation: 67
In Polymer 0.5 I could do this
public action(event, detail, sender){
var help = sender.getAttribute('data-action');
// do something with this value
}
I got this value in Polymer 1.0 too. But I think this is not the official method
detail.sourceEvent.path[2].getAttribute('data-action')
Can somebody show me the official way ?
Upvotes: 0
Views: 214
Reputation: 67
I got the solution. Just write:
event.currentTarget.getAttribute('data-action')
Upvotes: 2