      window.WebSocket = window.MozWebSocket;
            } else {
                msgs.innerHTML += "<li>Your browser doesn't support WebSockets.</li>";
            }
        }
        ws = new WebSocket('[[= ws_url ]]');
        //ws = new WebSocket('ws://127.0.0.1:8000/');
        ws.onopen = function(evt) {
            msgs.innerHTML += '<li>js: WebSocket connection opened.</li>';
        }
        ws.onmessage = function(evt) {
            msgs.innerHTML += '<li>' + evt.data + '</li>';
        }
      