Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (20 sloc) 0.492 kb
<!-- 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>
Jump to Line
Something went wrong with that request. Please try again.