interface EventSource
implements EventTarget
import { type EventSource } from "https://deno.land/x/evt@v2.5.2/lib/types/lib.dom.ts";
Properties
onerror: ((this: EventSource, ev: Event) => any) | null
onmessage: ((this: EventSource, ev: MessageEvent) => any) | null
onopen: ((this: EventSource, ev: Event) => any) | null
Returns the state of this EventSource object's connection. It can have the values described below.
Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise.
Methods
Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED.
addEventListener<K extends keyof EventSourceEventMap>(): void
type: K,
listener: (this: EventSource, ev: EventSourceEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
addEventListener(): void
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
removeEventListener<K extends keyof EventSourceEventMap>(): void
type: K,
listener: (this: EventSource, ev: EventSourceEventMap[K]) => any,
options?: boolean | EventListenerOptions,