Skip to content

Commit

Permalink
Change check for WebSocket existence
Browse files Browse the repository at this point in the history
Safari identifies its WebSocket as "object", whereas Chrome is
"function". By switching our check, we're forcing Chrome to use
long polling. This cheats us around the Chrome-14 issue, while
enabling WebSockets for Safari.
  • Loading branch information
trotter committed Sep 20, 2011
1 parent 3b7a61b commit 29d0e0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion javascripts/chloe-websocket.js
Expand Up @@ -36,5 +36,5 @@ Chloe.WebSocketTransport.prototype = {
};

Chloe.WebSocketTransport.isEnabled = function () {
return typeof(WebSocket) === "function";
return typeof(WebSocket) === "object";
};

0 comments on commit 29d0e0b

Please sign in to comment.