[Pkg-javascript-commits] [sockjs-client] 297/434: Cosmetic: _window instead of window

Tonnerre Lombard tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:47:20 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 4775f9e32d4822231eba5fecd9cb8a84e7e57a36
Author: Marek Majkowski <majek04 at gmail.com>
Date:   Fri Jan 13 15:31:10 2012 +0000

    Cosmetic: _window instead of window
---
 lib/trans-iframe-eventsource.js | 3 +--
 lib/trans-iframe-xhr-polling.js | 3 +--
 lib/trans-websocket.js          | 5 ++---
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/lib/trans-iframe-eventsource.js b/lib/trans-iframe-eventsource.js
index a13bc67..100884c 100644
--- a/lib/trans-iframe-eventsource.js
+++ b/lib/trans-iframe-eventsource.js
@@ -4,11 +4,10 @@ var EventSourceIframeTransport = SockJS['iframe-eventsource'] = function () {
     that.i_constructor.apply(that, arguments);
 };
 
-// Inheritance.
 EventSourceIframeTransport.prototype = new IframeTransport();
 
 EventSourceIframeTransport.enabled = function () {
-    return ('EventSource' in window) && IframeTransport.enabled();
+    return ('EventSource' in _window) && IframeTransport.enabled();
 };
 
 EventSourceIframeTransport.need_body = true;
diff --git a/lib/trans-iframe-xhr-polling.js b/lib/trans-iframe-xhr-polling.js
index 2e148d8..0ada5b7 100644
--- a/lib/trans-iframe-xhr-polling.js
+++ b/lib/trans-iframe-xhr-polling.js
@@ -4,11 +4,10 @@ var XhrPollingIframeTransport = SockJS['iframe-xhr-polling'] = function () {
     that.i_constructor.apply(that, arguments);
 };
 
-// Inheritance.
 XhrPollingIframeTransport.prototype = new IframeTransport();
 
 XhrPollingIframeTransport.enabled = function () {
-    return window.XMLHttpRequest && IframeTransport.enabled();
+    return _window.XMLHttpRequest && IframeTransport.enabled();
 };
 
 XhrPollingIframeTransport.need_body = true;
diff --git a/lib/trans-websocket.js b/lib/trans-websocket.js
index 417c304..8d7f78f 100644
--- a/lib/trans-websocket.js
+++ b/lib/trans-websocket.js
@@ -43,7 +43,6 @@ WebSocketTransport.prototype.doCleanup = function() {
     }
 };
 
-WebSocketTransport.enabled = function(options) {
-    return !!(window.WebSocket || window.MozWebSocket) &&
-        (!options.info || options.info.websocket !== false);
+WebSocketTransport.enabled = function() {
+    return !!(_window.WebSocket || _window.MozWebSocket);
 };

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