implemented Server Sent events and Heartbeat

This commit is contained in:
Stephan Richter
2020-09-18 17:52:33 +02:00
parent 28ade2f7fa
commit 02caf2866e
3 changed files with 115 additions and 44 deletions

View File

@@ -157,5 +157,9 @@ window.onload = function () {
$('.menu .addtile .list svg').click(enableAdding);
$('.menu .move .list div').click(enableMove);
$('.menu .actions .list > div').click(runAction);
$(BODY).click(bodyClick);
$(BODY).click(bodyClick);
var stream = new EventSource("stream");
stream.onmessage = function(ev){
console.log(ev);
}
}