interface EventSource {
    CLOSED: 2;
    CONNECTING: 0;
    OPEN: 1;
    onerror: ((this, ev) => any);
    onmessage: ((this, ev) => any);
    onopen: ((this, ev) => any);
    readyState: 0 | 1 | 2;
    url: string;
    withCredentials: boolean;
    addEventListener<K>(type, listener, options?): void;
    addEventListener(type, listener, options?): void;
    close(): void;
    dispatchEvent(event): boolean;
    removeEventListener<K>(type, listener, options?): void;
    removeEventListener(type, listener, options?): void;
}

Hierarchy

  • EventTarget
    • EventSource

Properties

CLOSED: 2
CONNECTING: 0
OPEN: 1
onerror: ((this, ev) => any)
onmessage: ((this, ev) => any)
onopen: ((this, ev) => any)
readyState: 0 | 1 | 2
url: string
withCredentials: boolean

Methods

  • Returns void

  • Parameters

    Returns boolean