readyState

The readyState read-only property of the EventSource interface returns a number representing the state of the connection.

MDN Reference