Permalink
Browse files

Better WebSocket detection added.

  • Loading branch information...
1 parent bf61e42 commit 719e65accd4da91ffdad55ba4f7c21dfef29957b @ellisonbg ellisonbg committed Aug 17, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 IPython/frontend/html/notebook/static/js/kernel.js
@@ -20,10 +20,12 @@ var IPython = (function (IPython) {
this.shell_channel = null;
this.iopub_channel = null;
this.running = false;
- if (typeof(WebSocket) === 'undefined') {
+ if (typeof(WebSocket) !== 'undefined') {
+ this.WebSocket = WebSocket
+ } else if (typeof(MozWebSocket) !== 'undefined') {
this.WebSocket = MozWebSocket
} else {
- this.WebSocket = WebSocket
+ alert('Your browser does not have WebSocket support, please try Chrome, Safari or Firefox 6');
};
};

0 comments on commit 719e65a

Please sign in to comment.