benchmarks/scenarios/ember.js
function (callback) {
      var _this = this;

      var guid = _emberMetalUtils.guidFor(this);

      _emberViewsSystemJquery.default(window).on('popstate.ember-location-' + guid, function (e) {
        // Ignore initial page load popstate event in Chrome
        if (!popstateFired) {
          popstateFired = true;
          if (_this.getURL() === _this._previousURL) {
            return;
          }
        }
        callback(_this.getURL());
      });
    }
function (callback) {
      var _this = this;

      var guid = _emberMetalUtils.guidFor(this);

      _emberViewsSystemJquery.default(window).on('popstate.ember-location-' + guid, function (e) {
        // Ignore initial page load popstate event in Chrome
        if (!popstateFired) {
          popstateFired = true;
          if (_this.getURL() === _this._previousURL) {
            return;
          }
        }
        callback(_this.getURL());
      });
    }
function ( callback ) { var _this = this ; var guid = _emberMetalUtils . guidFor ( this ) ; _emberViewsSystemJquery . default ( window ) . on ( 'popstate.ember-location-' + guid , function ( e ) { // Ignore initial page load popstate event in Chrome if ( ! popstateFired ) { popstateFired = true ; if ( _this . getURL ( ) === _this . _previousURL ) { return ; } } callback ( _this . getURL ( ) ) ; } ) ; }
Register a callback to be invoked whenever the browser
history changes, including using forward and back buttons.
@private
@method onUpdateURL
@param callback {Function}
Register a callback to be invoked whenever the browser history changes including using forward and back buttons .