JavaScriptEventi inviati dal server


Sintassi

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

Eventi inviati dal server Esempi correlati