Using HTML element event properties such as onclick
for Ember actions is not recommended for the following reasons:
- It doesn't work for SVGs (since there is no
onclick
property ofSVGElement
). - It can lead to confusing and unexpected behavior when mixed with normal action usage. For a comprehensive explanation of why, read Deep Dive on Ember Events.
This rule forbids the following:
This rule allows the following:
- Deep Dive on Ember Events
- Ember Template Action documentation
- List of DOM Events