Explorar el Código

Catch Mozilla prefixing of WebSocket.

Pull 475cfae from websockify.

In Firefox 7 Mozilla has added Websockets support but prefixed the
constructor with "Moz".
Joel Martin hace 14 años
padre
commit
ce3bdbccc2
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      include/websock.js

+ 3 - 0
include/websock.js

@@ -19,6 +19,9 @@
 
 
 if (window.WebSocket) {
 if (window.WebSocket) {
     Websock_native = true;
     Websock_native = true;
+} else if (window.MozWebSocket) {
+    Websock_native = true;
+    window.WebSocket = window.MozWebSocket;
 } else {
 } else {
     /* no builtin WebSocket so load web_socket.js */
     /* no builtin WebSocket so load web_socket.js */
     Websock_native = false;
     Websock_native = false;