Permalink
Browse files

In Firefox 6 WebSocket has been renamed to MozWebSocket. https://deve…

  • Loading branch information...
1 parent 4421e7a commit ac952eb2d7cc49d9f130a8717a1a92535245cb93 @NV NV committed Aug 17, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 examples/test.html
View
@@ -12,7 +12,8 @@
element.appendChild(p);
}
- ws = new WebSocket("ws://localhost:8080/");
+ var Socket = "MozWebSocket" in window ? MozWebSocket : WebSocket;
+ var ws = new Socket("ws://localhost:8080/");
ws.onmessage = function(evt) { debug("Message: " + evt.data); };
ws.onclose = function() { debug("socket closed"); };
ws.onopen = function() {

0 comments on commit ac952eb

Please sign in to comment.