Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Properties

CLOSED

CLOSED: number

CONNECTING

CONNECTING: number

EventTarget

EventTarget: object

Type declaration

  • constructor: function
    • Returns EventTarget

  • prototype: EventTarget

OPEN

OPEN: number

onerror

onerror: function | null

onmessage

onmessage: function | null

onopen

onopen: function | null

readyState

readyState: number

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

url

url: string

Returns the URL providing the event stream.

withCredentials

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.

Methods

addEventListener

close

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

    Returns void

dispatchEvent

  • dispatchEvent(event: Event): boolean
  • 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.

    Parameters

    Returns boolean

removeEventListener

Generated using TypeDoc