Documentation
    Preparing search index...

    Interface UniversalEventSource

    Common EventSource interface that can be implemented by different EventSource-like classes This is compatible with the standard EventSource API but allows for custom implementations

    interface UniversalEventSource {
        CLOSED: 2;
        CONNECTING: 0;
        onerror?: ((event: UniversalErrorEvent) => void) | null;
        onmessage?: ((event: UniversalMessageEvent) => void) | null;
        onopen?: ((event: UniversalEvent) => void) | null;
        OPEN: 1;
        readyState: 0 | 1 | 2;
        url: string;
        withCredentials: boolean;
        addEventListener(type: string, listener: (event: any) => void): void;
        close(): void;
        dispatchEvent(event: UniversalEvent): boolean;
        removeEventListener(type: string, listener: (event: any) => void): void;
    }
    Index

    Properties

    CLOSED: 2
    CONNECTING: 0
    onerror?: ((event: UniversalErrorEvent) => void) | null
    onmessage?: ((event: UniversalMessageEvent) => void) | null
    onopen?: ((event: UniversalEvent) => void) | null
    OPEN: 1
    readyState: 0 | 1 | 2
    url: string
    withCredentials: boolean

    Methods