Server-sent events

Download javascript eBook

Syntax

  • new EventSource("api/stream");
  • eventSource.onmessage=function(event){}
  • eventSource.onerror=function(event){};
  • eventSource.addEventListener=function(name, callback, options){};
  • eventSource.readyState;
  • eventSource.url;
  • eventSource.close();

Related Examples

Stats

120 Contributors: 2
Monday, September 5, 2016
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook