Sse Event¶
Import: import system.webapi;
For behavior and native target requirements, see Native Web APIs.
SseEvent¶
One server-sent event. Newlines in data are emitted as separate data lines.
data¶
Text payload of the event.
event¶
Optional event type sent to the client.
id¶
Optional event identifier used when reconnecting.
retry¶
Optional reconnection delay in milliseconds.
constructor¶
Creates a SseEvent with data, event, id, retry.
public constructor(
data: string,
event: Option<string> = Option.None,
id: Option<string> = Option.None,
retry: Option<int> = Option.None
)
data¶
Creates an event with only a data payload.