[Pkg-javascript-commits] [sockjs-client] 381/434: #57 - another try - don't set the iframe src as it adds an element to history
Tonnerre Lombard
tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:47:27 UTC 2014
This is an automated email from the git hooks/post-receive script.
tonnerre-guest pushed a commit to branch master
in repository sockjs-client.
commit e4d4dcda5de435d40a4f782964f891d3ba601fe1
Author: Marek Majkowski <majek04 at gmail.com>
Date: Thu Apr 12 17:39:56 2012 +0100
#57 - another try - don't set the iframe src as it adds an element to history
---
lib/dom.js | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/lib/dom.js b/lib/dom.js
index e7eca25..9ca18e9 100644
--- a/lib/dom.js
+++ b/lib/dom.js
@@ -96,7 +96,9 @@ utils.createIframe = function (iframe_url, error_callback) {
// This is required, in order to force ie7 to fire the
// onunload event. Setting .src must happen before the
// removeChild step.
- iframe.src = "";
+ if('ActiveXObject' in _window) {
+ iframe.src = "about:blank";
+ }
// This timeout makes chrome fire onbeforeunload event
// within iframe. Without the timeout it goes straight to
// onunload.
@@ -156,9 +158,11 @@ utils.createHtmlfile = function (iframe_url, error_callback) {
if (doc) {
unattach();
utils.detachEvent('unload', cleanup);
- try {
- iframe.src = "";
- } catch (x) {}
+ if('ActiveXObject' in _window) {
+ try {
+ iframe.src = "about:blank";
+ } catch (x) {}
+ }
iframe.parentNode.removeChild(iframe);
iframe = doc = null;
CollectGarbage();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git
More information about the Pkg-javascript-commits
mailing list