Permalink
Browse files

Adds customEvents documentation

  • Loading branch information...
Tom Dale
Tom Dale committed Aug 28, 2012
1 parent 479e598 commit 430c2b6960168b349e0e13a70145638e0eeea403
Showing with 20 additions and 0 deletions.
  1. +20 −0 packages/ember-application/lib/system/application.js
@@ -219,6 +219,26 @@ Ember.Application = Ember.Namespace.extend(
eventDispatcher: null,
/**
The DOM events for which the event dispatcher should listen.
By default, the application's `Ember.EventDispatcher` listens
for a set of standard DOM events, such as `mousedown` and
`keyup`, and delegates them to your application's `Ember.View`
instances.
If you would like additional events to be delegated to your
views, set your `Ember.Application`'s `customEvents` property
to a hash containing the DOM event name as the key and the
corresponding view method name as the value. For example:
App = Ember.Application.create({
customEvents: {
// add support for the loadedmetadata media
// player event
'loadedmetadata': "loadedMetadata"
}
});
@type Object
@default null
*/

0 comments on commit 430c2b6

Please sign in to comment.