Răsfoiți Sursa

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 14 ani în urmă
părinte
comite
ce3bdbccc2
1 a modificat fișierele cu 3 adăugiri și 0 ștergeri
  1. 3 0
      include/websock.js

+ 3 - 0
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;