Can't define customEvents in Ember.Application
kvas-damian opened this issue · comments
According to http://emberjs.com/api/classes/Ember.Application.html#property_customEvents it should be possible to define custom events in Ember.Application, although when using ember-hammer this feature doesn't work.
The issue:
customEvent
aren't passed correctly to Ember.EventDispatcher
Ember.EventDispatcher expects addedEvents
and rootElement
as separate parameters (https://github.com/emberjs/ember.js/blob/680f997ed0958c420abdcd0b1673111aee26afe7/packages/ember-views/lib/system/event_dispatcher.js#L131)
Instead of passing them separately ember-hammer passes an array: Array.prototype.slice.call(arguments)
(https://github.com/chriswessels/ember-hammer/blob/master/ember-hammer.js#L161)
Fixed by #17. Thanks @kvas-damian!