EventDispatcher#canDispatchToEventManager

canDispatchToEventManagerbooleanprivate

Defined in packages/ember-views/lib/system/event_dispatcher.js:110
Available since 1.7.0

It enables events to be dispatched to the view's eventManager. When present, this object takes precedence over handling of events on the view itself.

Note that most Ember applications do not use this feature. If your app also does not use it, consider setting this property to false to gain some performance improvement by allowing the EventDispatcher to skip the search for the eventManager on the view tree.

let EventDispatcher = Em.EventDispatcher.extend({
  events: {
      click       : 'click',
      focusin     : 'focusIn',
      focusout    : 'focusOut',
      change      : 'change'
  },
  canDispatchToEventManager: false
});
container.register('event_dispatcher:main', EventDispatcher);

Default: 'true'

doc_EmberJs
2016-11-30 16:52:04
Comments
Leave a Comment

Please login to continue.