This commit is contained in:
Your Name 2020-01-20 14:51:59 +00:00
parent c261aa62d3
commit 2f16eac316
1 changed files with 5 additions and 5 deletions

View File

@ -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: {