Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/danet/src/deps.ts>Context#sendEvents

The most mature backend framework for Deno
Go to Latest
method Context.prototype.sendEvents
import { Context } from "https://deno.land/x/danet@1.7.4/src/deps.ts";

Convert the connection to stream events, returning an event target for sending server sent events. Events dispatched on the returned target will be sent to the client and be available in the client's EventSource that initiated the connection.

This will set .respond to false.

Parameters

optional
options: ServerSentEventTargetOptions

Returns

ServerSentEventTarget