guest_worker/www/status.html

22 lines
426 B
HTML
Raw Normal View History

2019-10-23 22:33:37 +02:00
<html>
<head>
<title>Status</title>
</head>
<body>
Status!
websocket at /status/ws
2019-10-30 15:19:32 +01:00
<ol id='msgs'>
</ol>
<script>
let url = window.location.origin.replace('http', 'ws') +'/status/ws';
let el = document.getElementById("msgs")
let socket = new WebSocket(url);
socket.addEventListener('message', function(e){
let liEl = document.createElement('li');
liEl.innerHTML = e.data;
el.appendChild(liEl);
});
</script>
2019-10-23 22:33:37 +02:00
</body>
</html>