From ce3bdbccc2a58d6c9ab6d0eeceb3f6ac3bc3b5e5 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Tue, 2 Aug 2011 08:02:51 -0500 Subject: [PATCH] Catch Mozilla prefixing of WebSocket. Pull 475cfae from websockify. In Firefox 7 Mozilla has added Websockets support but prefixed the constructor with "Moz". --- include/websock.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/websock.js b/include/websock.js index 54be567b..a688f76f 100644 --- a/include/websock.js +++ b/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;