guest_worker/www/status.html

22 lines
426 B
HTML
Raw Normal View History

2019-10-23 20:33:37 +00:00
<html>
<head>
<title>Status</title>
</head>
<body>
Status!
websocket at /status/ws
2019-10-30 14:19:32 +00: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 20:33:37 +00:00
</body>
</html>