Skip to content
This repository
Browse code

minor changes to server-sent events

Change yaws_sse to send close connection header by default, and change the
example to return an Allow header if anything other than GET is requested.
  • Loading branch information...
commit 694859075e80c2fc8818c150f5c2b5586e3e137e 1 parent 6561513
Steve Vinoski vinoski authored

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. +2 1  www/server_sent_events.html
3  www/server_sent_events.html
@@ -5,7 +5,8 @@
5 5 <script type="text/javascript">
6 6 var es = new EventSource('/sse');
7 7 es.onmessage = function(event) {
8   - document.querySelector('#date-time').innerHTML = event.data;
  8 + var h2 = document.querySelector('#date-time');
  9 + h2.innerHTML = event.data;
9 10 }
10 11 </script>
11 12 </head>

0 comments on commit 6948590

Please sign in to comment.
Something went wrong with that request. Please try again.