Skip to content

Commit

Permalink
improve inline comments
Browse files Browse the repository at this point in the history
  • Loading branch information
akre54 committed Feb 20, 2014
1 parent e5eeea4 commit 91ef885
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions backbone.js
Original file line number Diff line number Diff line change
Expand Up @@ -1393,14 +1393,15 @@
this._hasPushState = !!(this.options.pushState && this.history && this.history.pushState);
var fragment = this.getFragment();

// Cross-platform `addEventListener`.
// Add a cross-platform `addEventListener` shim for older browsers.
var addEventListener = window.addEventListener || function (eventName, listener) {
return attachEvent('on' + eventName, listener);
};

// Normalize root to always include a leading and trailing slash.
this.root = ('/' + this.root + '/').replace(rootStripper, '/');

// Proxy an iframe to handle location events on older versions of IE
try {
var body = document.body;
var docMode = document.documentMode || 0;
Expand Down Expand Up @@ -1458,7 +1459,7 @@
// Disable Backbone.history, perhaps temporarily. Not useful in a real app,
// but possibly useful for unit testing Routers.
stop: function() {
// Cross-platform `removeEventListener`.
// Add a cross-platform `removeEventListener` shim for older browsers.
var removeEventListener = window.removeEventListener || function (eventName, listener) {
return detachEvent('on' + eventName, listener);
};
Expand Down

0 comments on commit 91ef885

Please sign in to comment.