Function createEventSource

  • Creates a new EventSource. The connection attempt starts before this function returns, so a caller must attach any listener it needs (onopen, onerror, addEventListener, ...) right after this call, before any other code runs, to avoid missing an event.

    Parameters

    • url: string

      The URL to which to connect.

    • Optional eventSourceInitDict: Partial<EventSourceInitDict>

      Extra init params. See README for details.

      Optional

    Returns EventSource

Generated using TypeDoc