[Pkg-javascript-commits] [backbone] 206/281: Simple refactoring

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 17:02:13 UTC 2014


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

js pushed a commit to tag 0.9.0
in repository backbone.

commit 07ba2d539800efca8fdcb3af385358e6fbcc8aaf
Author: Edil Kratskih <edil.kratskih at gmail.com>
Date:   Mon Jan 16 13:10:34 2012 +0600

    Simple refactoring
---
 backbone.js | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/backbone.js b/backbone.js
index 4340366..7421198 100644
--- a/backbone.js
+++ b/backbone.js
@@ -758,11 +758,12 @@
       var docMode           = document.documentMode;
       var oldIE             = (isExplorer.exec(navigator.userAgent.toLowerCase()) && (!docMode || docMode <= 7));
       if (oldIE) {
-        var history = this;
-        var src = 'javascript:document.open();document.domain="' + document.domain + '";document.close();';
-        var frame = $('<iframe></iframe>').attr('src', src).hide().bind('load', function() {
-          history.frame = frame.contentWindow;
-        }).appendTo('body');
+        $('<iframe></iframe')
+          .attr('src', 'javascript:document.open();document.domain="' + document.domain + '";document.close();')
+          .bind('load', $.proxy(function(e) {
+            this.iframe = e.target.contentWindow;
+          }, this))
+          .hide().appendTo('body');
 
         this.navigate(fragment);
       }

-- 
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