Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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@v1.41.0/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>