summaryrefslogtreecommitdiff
path: root/scripts/socket/sock.js
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/socket/sock.js')
-rw-r--r--scripts/socket/sock.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/socket/sock.js b/scripts/socket/sock.js
index 0a04b63..2135551 100644
--- a/scripts/socket/sock.js
+++ b/scripts/socket/sock.js
@@ -36,7 +36,7 @@ class SockWorker extends EventTarget{
// Attempts to turn the message into a usable object and pass it to the callback
msg (e) {
if(typeof e.data == "string") {
- var dat = JSON.parse(e.data);
+ let dat = JSON.parse(e.data);
this.dispatchEvent(new CustomEvent(dat.type, {detail: dat.data}));
}
}
@@ -60,7 +60,7 @@ class SockWorker extends EventTarget{
// Send a message to the server
send (type, data) {
- var m = new Message(type, data);
+ let m = new Message(type, data);
this.socket.send(m.stringify())
}