The Emblem syntax guide shows you can attach actions to an element like this
a click="toggleHeader" my plain text
which compiles to this in handlebars:
<a {{action toggleHeader on="click"}}>my plain text</a>
For multiple event listeners on the same element, can you do something like this
a click="toggleHeader" touchEnd="toggleHeader"
or
<a {{action toggleHeader on="click touchEnd"}}>x</a>
I've tried both, but neither work.
Is it even necessary to attach multiple event listeners when trying to make clicking in the browser behave the same way as touching in mobile or touch screens?
If Ember already has convenience methods that account for web and mobile events, can you point me to the reference. This link does not qualify because it just lists names, and doesn't tell you if any are composite event listeners.
Hopefully, as the line between laptops and touch screens become blurred, we'll eventually have vanilla jQuery that accounts for both types with one method (unless the combined packages exists already).
As this JSBin will show you, you can't have multiple events trigger the same action using the inline
actionhelper. There's been discussions about adding this type of functionality, but I believe they've all ended with the Ember team suggesting you use a view instead of the inlineactionhelper.So I'm guessing the reason that Emblem won't output what you want is because it's not valid Ember code. I suggest using a view or a component to achieve what you want.