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

x/deno/cli/tsc/dts/lib.deno.unstable.d.ts>Deno.jupyter.broadcast

A modern runtime for JavaScript and TypeScript.
Latest
function Deno.jupyter.broadcast
import { Deno } from "https://deno.land/x/deno@v2.0.4/cli/tsc/dts/lib.deno.unstable.d.ts";
const { broadcast } = Deno.jupyter;

Broadcast a message on IO pub channel.

await Deno.jupyter.broadcast("display_data", {
  data: { "text/html": "<b>Processing.</b>" },
  metadata: {},
  transient: { display_id: "progress" }
});

await new Promise((resolve) => setTimeout(resolve, 500));

await Deno.jupyter.broadcast("update_display_data", {
  data: { "text/html": "<b>Processing..</b>" },
  metadata: {},
  transient: { display_id: "progress" }
});

Parameters

msgType: string
content: Record<string, unknown>
optional
extra: { metadata?: Record<string, unknown>; buffers?: Uint8Array[]; }

Returns

Promise<void>