pull/2/head
ibuler 2014-11-05 00:31:05 +08:00
parent 5f302866ca
commit 271b80991a
2 changed files with 2 additions and 2 deletions

View File

@ -1021,7 +1021,7 @@ def lower_case(request):
def test_websocket(request): def test_websocket(request):
return HttpResponse('websocket.html') return render_to_response('websocket.html')

View File

@ -8,7 +8,7 @@
output = document.getElementById("output"); testWebSocket(); output = document.getElementById("output"); testWebSocket();
} }
function testWebSocket() { function testWebSocket() {
websocket = new WebSocket(wsUri); var websocket = new WebSocket(wsUri);
websocket.onopen = function(evt) { onOpen(evt) }; websocket.onopen = function(evt) { onOpen(evt) };
websocket.onclose = function(evt) { onClose(evt) }; websocket.onclose = function(evt) { onClose(evt) };
websocket.onmessage = function(evt) { onMessage(evt) }; websocket.onmessage = function(evt) { onMessage(evt) };