Browse Source

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 năm trước cách đây
mục cha
commit
ce3bdbccc2
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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;