[Pkg-javascript-commits] [backbone] 67/74: slight refactor to old-IE detection.

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 16:59:10 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag 0.3.0
in repository backbone.

commit 9ebe66b4a23733a468b4bbacb9ee1387201a8d75
Author: Jeremy Ashkenas <jashkenas at gmail.com>
Date:   Tue Nov 9 11:00:50 2010 -0500

    slight refactor to old-IE detection.
---
 backbone.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/backbone.js b/backbone.js
index a16b649..cf8239a 100644
--- a/backbone.js
+++ b/backbone.js
@@ -664,11 +664,12 @@
     // Start the hash change handling, returning true if the current URL matches
     // an existing route, and false otherwise.
     start : function() {
-      if ($.browser.msie && $.browser.version < 8) {
+      var docMode = document.documentMode;
+      var oldIE = ($.browser.msie && docMode < 7);
+      if (oldIE) {
         this.iframe = $('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo('body')[0].contentWindow;
       }
-      var docMode = document.documentMode;
-      if ('onhashchange' in window && (!docMode || docMode > 7)) {
+      if ('onhashchange' in window && !oldIE) {
         $(window).bind('hashchange', this.checkUrl);
       } else {
         setInterval(this.checkUrl, this.interval);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/backbone.git



More information about the Pkg-javascript-commits mailing list