Skip to content

Commit

Permalink
updated WebSocket diagnostics test in Mojo::HelloWorld for latest Fir…
Browse files Browse the repository at this point in the history
…efox Aurora
  • Loading branch information
kraih committed Jun 16, 2011
1 parent 62a6a00 commit 4552589
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ This file documents the revision history for Perl extension Mojolicious.
1.44 2011-06-13 00:00:00
- Added EXPERIMENTAL application mount plugin.
- Updated prettify.js to version 1-Jun-2011.
- Updated WebSocket diagnostics test in Mojo::HelloWorld for latest
Firefox Aurora.
- Improved documentation.
- Improved tests.
- Fixed a few application embedding bugs.
Expand Down
8 changes: 7 additions & 1 deletion lib/Mojo/HelloWorld.pm
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,14 @@ sub _websocket {
<head>
<title>Mojo Diagnostics</title>
<script language="javascript">
if ("WebSocket" in window) {
var ws;
if ("MozWebSocket" in window) {
ws = new MozWebSocket("$url");
}
else if ("WebSocket" in window) {
ws = new WebSocket("$url");
}
if(typeof(ws) !== 'undefined') {
function wsmessage(event) {
data = event.data;
alert(data);
Expand Down

0 comments on commit 4552589

Please sign in to comment.