Interface EventSource

Hierarchy

Properties

CLOSED: 2
CONNECTING: 0
OPEN: 1
onerror: ((this, ev) => any)

Type declaration

onmessage: ((this, ev) => any)

Type declaration

onopen: ((this, ev) => any)

Type declaration

readyState: number

Returns the state of this EventSource object's connection. It can have the values described below.

MDN Reference

url: string

Returns the URL providing the event stream.

MDN Reference

withCredentials: boolean

Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise.

MDN Reference

Methods

  • Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED.

    MDN Reference

    Returns void

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    MDN Reference

    Parameters

    Returns boolean

  • Type Parameters

    Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void