Skip to content

Commit 9f6f147

Browse files
committed
Merge pull request joewalnes#43 from josh/feature-check-ws
Feature detect WebSockets in older clients
2 parents e70fc3b + 2aca74d commit 9f6f147

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

reconnecting-websocket.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@
102102
}
103103
})(this, function () {
104104

105+
if (!('WebSocket' in window)) {
106+
return;
107+
}
108+
105109
function ReconnectingWebSocket(url, protocols, options) {
106110

107111
// Default settings

0 commit comments

Comments
 (0)