Sanity API specific EventSource handler shared between the listen and live APIs
Since the EventSource API is not provided by all environments, this function enables custom initialization of the EventSource instance
for runtimes that requires polyfilling or custom setup logic (e.g. custom HTTP headers)
via the passed initEventSource function which must return an EventSource instance.
Possible errors to be thrown on the returned observable are:
Sanity API specific EventSource handler shared between the listen and live APIs
Since the
EventSourceAPI is not provided by all environments, this function enables custom initialization of the EventSource instance for runtimes that requires polyfilling or custom setup logic (e.g. custom HTTP headers) via the passedinitEventSourcefunction which must return an EventSource instance.Possible errors to be thrown on the returned observable are: