Down the road HTMLBars will support adding helpers directly to component tags: <custom-component {{helper}}></custom-component> until then we need to be able to bind events to components. Ember uses custom a on-event attribute that would work for us. Components should also have a .trigger property to trigger custom events.
When a component is created, if a on-eventName attribute is found, the proper event listeners should be bound. The space seperated list of strings on the component tag represent methods on the parent component to call when the events are triggered.
Components should be able to call this.trigger('eventName') internally to notify parent components. This should take all the options that $.trigger does.
On detachCallback, all event bindings on the component should be cleaned up.
Down the road HTMLBars will support adding helpers directly to component tags:
<custom-component {{helper}}></custom-component>
until then we need to be able to bind events to components. Ember uses custom aon-event
attribute that would work for us. Components should also have a.trigger
property to trigger custom events.