Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 20 lines (20 sloc) 0.492 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
<!-- HTML document served to start the Server Side Events demo
See examples/src/server_side_events.erl for the server -->
<html>
<head>
<script type="text/javascript">
    var es = new EventSource('/sse');
    es.onmessage = function(event) {
        var h2 = document.querySelector('#date-time');
        h2.innerHTML = event.data;
    }
</script>
</head>
<body>
<center>
<h1>Yaws Server-Sent Events Time of Day</h1>
<h2 id="date-time" name="date-time">
</h2>
</center>
</body>
</html>
Something went wrong with that request. Please try again.