summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2011-08-02 08:02:51 -0500
committerJoel Martin <github@martintribe.org>2011-08-02 08:02:51 -0500
commitce3bdbccc2a58d6c9ab6d0eeceb3f6ac3bc3b5e5 (patch)
tree3e51aa61874ccf152cf86f8eb89c05291fb8b556
parentad3f7624093e6e467f6978f1c5afde0641b9bcda (diff)
downloadnovnc-ce3bdbccc2a58d6c9ab6d0eeceb3f6ac3bc3b5e5.tar.gz
Catch Mozilla prefixing of WebSocket.
Pull 475cfae from websockify. In Firefox 7 Mozilla has added Websockets support but prefixed the constructor with "Moz".
-rw-r--r--include/websock.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/websock.js b/include/websock.js
index 54be567..a688f76 100644
--- a/include/websock.js
+++ b/include/websock.js
@@ -19,6 +19,9 @@
if (window.WebSocket) {
Websock_native = true;
+} else if (window.MozWebSocket) {
+ Websock_native = true;
+ window.WebSocket = window.MozWebSocket;
} else {
/* no builtin WebSocket so load web_socket.js */
Websock_native = false;