aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/assets/scripts.js
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/assets/scripts.js')
-rw-r--r--juick-server/src/main/assets/scripts.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/juick-server/src/main/assets/scripts.js b/juick-server/src/main/assets/scripts.js
index 95cbe22f..36678f97 100644
--- a/juick-server/src/main/assets/scripts.js
+++ b/juick-server/src/main/assets/scripts.js
@@ -143,7 +143,7 @@ function initES() {
pageTitle = document.title;
}
};
- es.onmessage = function(msg) {
+ es.addEventListener("msg", msg => {
try {
var jsonMsg = JSON.parse(msg.data);
console.log('data: ' + msg.data);
@@ -154,7 +154,7 @@ function initES() {
} catch (err) {
console.log(err);
}
- };
+ });
}
function wsIncomingReply(msg) {