benchmarks/scenarios/ember.js
function (addedEvents, rootElement) {
      var event;
      var events = this._finalEvents = _emberMetalAssign.default({}, _emberMetalProperty_get.get(this, 'events'), addedEvents);

      if (!_emberMetalIs_none.default(rootElement)) {
        _emberMetalProperty_set.set(this, 'rootElement', rootElement);
      }

      rootElement = _emberViewsSystemJquery.default(_emberMetalProperty_get.get(this, 'rootElement'));

      _emberMetalDebug.assert('You cannot use the same root element (' + (rootElement.selector || rootElement[0].tagName) + ') multiple times in an Ember.Application', !rootElement.is(ROOT_ELEMENT_SELECTOR));
      _emberMetalDebug.assert('You cannot make a new Ember.Application using a root element that is a descendent of an existing Ember.Application', !rootElement.closest(ROOT_ELEMENT_SELECTOR).length);
      _emberMetalDebug.assert('You cannot make a new Ember.Application using a root element that is an ancestor of an existing Ember.Application', !rootElement.find(ROOT_ELEMENT_SELECTOR).length);

      rootElement.addClass(ROOT_ELEMENT_CLASS);

      _emberMetalDebug.assert('Unable to add \'' + ROOT_ELEMENT_CLASS + '\' class to rootElement. Make sure you set rootElement to the body or an element in the body.', rootElement.is(ROOT_ELEMENT_SELECTOR));

      for (event in events) {
        if (events.hasOwnProperty(event)) {
          this.setupHandler(rootElement, event, events[event]);
        }
      }
    }
function (addedEvents, rootElement) {
      var event;
      var events = this._finalEvents = _emberMetalAssign.default({}, _emberMetalProperty_get.get(this, 'events'), addedEvents);

      if (!_emberMetalIs_none.default(rootElement)) {
        _emberMetalProperty_set.set(this, 'rootElement', rootElement);
      }

      rootElement = _emberViewsSystemJquery.default(_emberMetalProperty_get.get(this, 'rootElement'));

      _emberMetalDebug.assert('You cannot use the same root element (' + (rootElement.selector || rootElement[0].tagName) + ') multiple times in an Ember.Application', !rootElement.is(ROOT_ELEMENT_SELECTOR));
      _emberMetalDebug.assert('You cannot make a new Ember.Application using a root element that is a descendent of an existing Ember.Application', !rootElement.closest(ROOT_ELEMENT_SELECTOR).length);
      _emberMetalDebug.assert('You cannot make a new Ember.Application using a root element that is an ancestor of an existing Ember.Application', !rootElement.find(ROOT_ELEMENT_SELECTOR).length);

      rootElement.addClass(ROOT_ELEMENT_CLASS);

      _emberMetalDebug.assert('Unable to add \'' + ROOT_ELEMENT_CLASS + '\' class to rootElement. Make sure you set rootElement to the body or an element in the body.', rootElement.is(ROOT_ELEMENT_SELECTOR));

      for (event in events) {
        if (events.hasOwnProperty(event)) {
          this.setupHandler(rootElement, event, events[event]);
        }
      }
    }
function ( addedEvents , rootElement ) { var event ; var events = this . _finalEvents = _emberMetalAssign . default ( { } , _emberMetalProperty_get . get ( this , 'events' ) , addedEvents ) ; if ( ! _emberMetalIs_none . default ( rootElement ) ) { _emberMetalProperty_set . set ( this , 'rootElement' , rootElement ) ; } rootElement = _emberViewsSystemJquery . default ( _emberMetalProperty_get . get ( this , 'rootElement' ) ) ; _emberMetalDebug . assert ( 'You cannot use the same root element (' + ( rootElement . selector || rootElement [ 0 ] . tagName ) + ') multiple times in an Ember.Application' , ! rootElement . is ( ROOT_ELEMENT_SELECTOR ) ) ; _emberMetalDebug . assert ( 'You cannot make a new Ember.Application using a root element that is a descendent of an existing Ember.Application' , ! rootElement . closest ( ROOT_ELEMENT_SELECTOR ) . length ) ; _emberMetalDebug . assert ( 'You cannot make a new Ember.Application using a root element that is an ancestor of an existing Ember.Application' , ! rootElement . find ( ROOT_ELEMENT_SELECTOR ) . length ) ; rootElement . addClass ( ROOT_ELEMENT_CLASS ) ; _emberMetalDebug . assert ( 'Unable to add \'' + ROOT_ELEMENT_CLASS + '\' class to rootElement. Make sure you set rootElement to the body or an element in the body.' , rootElement . is ( ROOT_ELEMENT_SELECTOR ) ) ; for ( event in events ) { if ( events . hasOwnProperty ( event ) ) { this . setupHandler ( rootElement , event , events [ event ] ) ; } } }
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.
@private
@method setup
@param addedEvents {Object}
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 .