Evented#on()

on (name, target, method) public Defined in packages/ember-runtime/lib/mixins/evented.js:52 Subscribes to a named event with given function. person.on('didLoad', function() { // fired once the person has loaded }); An optional target can be passed in as the 2nd argument that will be set as the "this" for the callback. This is a good way to give your function access to the object triggering the event. When the target parameter is used the callback becomes the third argument. Parameters:

Evented#off()

off (name, target, method) public Defined in packages/ember-runtime/lib/mixins/evented.js:127 Cancels subscription for given name, target, and method. Parameters: name String The name of the event target Object The target of the subscription method Function The function of the subscription Returns: this

Evented#has()

has (name) Booleanpublic Defined in packages/ember-runtime/lib/mixins/evented.js:142 Checks to see if object has any subscriptions for named event. Parameters: name String The name of the event Returns: Boolean does the object have a subscription for event

Evented

Ember.Evented Class PUBLIC Defined in: packages/ember-runtime/lib/mixins/evented.js:14 Module: ember-runtime This mixin allows for Ember objects to subscribe to and emit events. App.Person = Ember.Object.extend(Ember.Evented, { greet: function() { // ... this.trigger('greet'); } }); var person = App.Person.create(); person.on('greet', function() { console.log('Our person has greeted'); }); person.greet(); // outputs: 'Our person has greeted' You can also chain multiple e

EventDispatcher#setupHandler()

setupHandler (rootElement, event, eventName) private Defined in packages/ember-views/lib/system/event_dispatcher.js:184 Registers an event listener on the rootElement. If the given event is triggered, the provided event handler will be triggered on the target view. If the target view does not implement the event handler, or if the handler returns false, the parent view will be called. The event will continue to bubble to each successive parent view until it reaches the top. Parameters: r

EventDispatcher#setup()

setup (addedEvents) private Defined in packages/ember-views/lib/system/event_dispatcher.js:145 Sets up event listeners for standard browser events. This will be called after the browser sends a DOMContentReady event. By default, it will set up all of the listeners on the document body. If you would like to register the listeners on a different element, set the event dispatcher's root property. Parameters: addedEvents Object

EventDispatcher#rootElement

rootElementDOMElementprivate Defined in packages/ember-views/lib/system/event_dispatcher.js:94 The root DOM element to which event listeners should be attached. Event listeners will be attached to the document unless this is overridden. Can be specified as a DOMElement or a selector string. The default body is a string since this may be evaluated before document.body exists in the DOM. Default: 'body'

EventDispatcher#registeredActions

registeredActionsObjectprivate Defined in packages/ember-views/lib/system/action_manager.js:8 Global action id hash.

EventDispatcher#events

eventsObjectprivate Defined in packages/ember-views/lib/system/event_dispatcher.js:35 The set of events names (and associated handler function names) to be setup and dispatched by the EventDispatcher. Modifications to this list can be done at setup time, generally via the Ember.Application.customEvents hash. To add new events to be listened to: let App = Ember.Application.create({ customEvents: { paste: 'paste' } }); To prevent default events from being listened to: let App = Ember

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 se