Skip to main content
Latest
class oak.ServerSentEvent
extends Event
import { oak } from "https://deno.land/x/create_react_app@v0.1.2/deps.ts";
const { ServerSentEvent } = oak;

An event which contains information which will be sent to the remote connection and be made available in an EventSource as an event.

Constructors

new
ServerSentEvent(
type: string,
data: any,
unnamed 2?: ServerSentEventInit,
)

Properties

readonly
data: string

The data associated with the event, which will be sent to the client and be made available in the EventSource.

readonly
id: number | undefined

The optional ID associated with the event that will be sent to the client and be made available in the EventSource.

Methods

toString(): string