[Pkg-javascript-commits] [backbone] 131/281: Cross domain issue patch for old ie browsers (<=7)
Jonas Smedegaard
js at moszumanska.debian.org
Sat May 3 17:02:04 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 32b2f28ba98f73a14cfb6aff12d4257459756a08
Author: Edil Kratskih <edil.kratskih at gmail.com>
Date: Wed Dec 21 13:18:57 2011 +0600
Cross domain issue patch for old ie browsers (<=7)
---
backbone.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/backbone.js b/backbone.js
index a74453b..4340366 100644
--- a/backbone.js
+++ b/backbone.js
@@ -758,7 +758,12 @@
var docMode = document.documentMode;
var oldIE = (isExplorer.exec(navigator.userAgent.toLowerCase()) && (!docMode || docMode <= 7));
if (oldIE) {
- this.iframe = $('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo('body')[0].contentWindow;
+ 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');
+
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