[Pkg-javascript-commits] [sockjs-client] 126/434: In Safari 'EventSource' is an object, not a function. Make es detection more robust.

Tonnerre Lombard tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:47:08 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 4a06440231acaf994b0378b69e8cd2cd890a3569
Author: Marek Majkowski <majek04 at gmail.com>
Date:   Tue Sep 6 12:34:52 2011 +0100

    In Safari 'EventSource' is an object, not a function. Make es detection more robust.
---
 lib/trans-iframe-eventsource.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/trans-iframe-eventsource.js b/lib/trans-iframe-eventsource.js
index 10ca71c..eaf691c 100644
--- a/lib/trans-iframe-eventsource.js
+++ b/lib/trans-iframe-eventsource.js
@@ -8,7 +8,7 @@ var EventSourceIframeTransport = SockJS['iframe-eventsource'] = function () {
 EventSourceIframeTransport.prototype = new IframeTransport();
 
 EventSourceIframeTransport.enabled = function () {
-    return (typeof EventSource === 'function') && IframeTransport.enabled();
+    return ('EventSource' in window) && IframeTransport.enabled();
 };
 
 EventSourceIframeTransport.need_chunking = true;

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