[Pkg-javascript-commits] [sockjs-client] 19/350: Remove test for iframe.contentWindow
tonnerre at ancient-solutions.com
tonnerre at ancient-solutions.com
Fri Aug 5 01:03:37 UTC 2016
This is an automated email from the git hooks/post-receive script.
tonnerre-guest pushed a commit to branch upstream
in repository sockjs-client.
commit 595a0330e108673c8a718d4538d580ced68a73b2
Author: DustyHarry <dannymau at gmail.com>
Date: Thu Mar 27 07:09:04 2014 +0000
Remove test for iframe.contentWindow
Remove the check for that.iframeObj.iframe.contentWindow before call postMessage; the utils.createIframe does not return a reference to the iframe (reference removed in change #55 to dom.js) so this check always fails and no close message is ever sent.
The post method set up in utils.createIframe already tests for iframe.contentWindow so this approach seems safe.
---
lib/trans-iframe.js | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/lib/trans-iframe.js b/lib/trans-iframe.js
index c4eb2c3..ec1fd09 100644
--- a/lib/trans-iframe.js
+++ b/lib/trans-iframe.js
@@ -45,9 +45,7 @@ IframeTransport.prototype.doCleanup = function() {
try {
// When the iframe is not loaded, IE raises an exception
// on 'contentWindow'.
- if (that.iframeObj.iframe.contentWindow) {
- that.postMessage('c');
- }
+ that.postMessage('c');
} catch (x) {}
that.iframeObj.cleanup();
that.iframeObj = null;
--
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