]> git.proxmox.com Git - mirror_novnc.git/commitdiff
Catch Mozilla prefixing of WebSocket.
authorJoel Martin <github@martintribe.org>
Tue, 2 Aug 2011 13:02:51 +0000 (08:02 -0500)
committerJoel Martin <github@martintribe.org>
Tue, 2 Aug 2011 13:02:51 +0000 (08:02 -0500)
Pull 475cfae from websockify.

In Firefox 7 Mozilla has added Websockets support but prefixed the
constructor with "Moz".

include/websock.js

index 54be567bac4b8644605d3e462a03590eb1e52e2e..a688f76f1724d7b2fe9a6539a422e040c33b10d1 100644 (file)
@@ -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;