From: Christian Heller Date: Thu, 22 Oct 2020 21:18:04 +0000 (+0200) Subject: Fix. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%7B%7B%20web_path%20%7D%7D/task?a=commitdiff_plain;h=79efff96255f669af6aa39fe5fdd7f24afede882;p=plomrogue2-experiments Fix. --- diff --git a/new2/websocket_client.html b/new2/websocket_client.html index e91e4ef..9d3c7f0 100644 --- a/new2/websocket_client.html +++ b/new2/websocket_client.html @@ -51,7 +51,7 @@ write(3, 3, "hallihallo"); drawBox(5, 25, 5, 5); var websocket = new WebSocket(websocket_location); -exampleSocket.onmessage = function (event) { +websocket.onmessage = function (event) { write(2, 2, event.data); } @@ -65,7 +65,7 @@ document.addEventListener('keydown', (event) => { case 'j': cursor[0] += 1; break; case 'k': cursor[0] -= 1; break; case 'l': cursor[1] += 1; break; - case 'x': exampleSocket.send('test'); + case 'x': websocket.send('test'); } write(cursor[0], cursor[1], '@'); }, false);