From 2f16eac316094062a6b9e44018cd2e641eb2ded1 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 20 Jan 2020 14:51:59 +0000 Subject: [PATCH] /ws/ --- index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 68685b0..e993956 100644 --- a/index.html +++ b/index.html @@ -120,11 +120,11 @@ this.psi.set(0); // set actual value // Set up websocket connection - this.sock = new WebSocket("wss://" + window.location.hostname + "/ws"); - this.sock.addEventListener('open', function(event) { this.gotWsOpen(event); }); - this.sock.addEventListener('message', function(event) { this.gotWsMessage(event); }); - this.sock.addEventListener('error', function(event) { this.gotWsError(event); }); - this.sock.addEventListener('close', function(event) { this.gotWsClose(event); }); + this.sock = new WebSocket("wss://" + window.location.hostname + "/ws/"); + this.sock.addEventListener('open', this.gotWsOpen ); + this.sock.addEventListener('message', this.gotWsMessage); + this.sock.addEventListener('error', this.gotWsError); + this.sock.addEventListener('close', this.gotWsClose); }, methods: {