소스 검색

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 년 전
부모
커밋
ce3bdbccc2
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  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;