The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on.
The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on. The event target may be an Element in a document, the Document itself, a Window, or any other object that supports events (such as XMLHttpRequest).
MDN
The close() method must abort any instances of the fetch algorithm started for this EventSource object, and must set the readyState attribute to CLOSED.
The close() method must abort any instances of the fetch algorithm started for this EventSource object, and must set the readyState attribute to CLOSED. W3C 2012
Dispatches an Event at the specified EventTarget, invoking the affected EventListeners in the appropriate order.
Dispatches an Event at the specified EventTarget, invoking the affected EventListeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) apply to events dispatched manually with dispatchEvent().
MDN
The readyState attribute represents the state of the connection.
The readyState attribute represents the state of the connection. W3C 2012
Removes the event listener previously registered with EventTarget.addEventListener.
Removes the event listener previously registered with EventTarget.addEventListener.
MDN
The url attribute must return the absolute URL that resulted from resolving the value that was passed to the constructor.
The url attribute must return the absolute URL that resulted from resolving the value that was passed to the constructor. W3C 2012
The withCredentials attribute must return the value to which it was last initialized.
The withCredentials attribute must return the value to which it was last initialized. When the object is created without withCredentials presents in the settings, it must be initialized to false. If it has the value true, then set CORS mode to Use Credentials and initialize the new EventSource object's withCredentials attribute. W3C 2012
EventSource enables servers to push data to Web pages over HTTP or using dedicated server-push protocols. Event streams requests can be redirected using HTTP 301 and 307 redirects as with normal HTTP requests. Clients will reconnect if the connection is closed; a client can be told to stop reconnecting using the HTTP 204 No Content response code. W3C 2012