From 9a46a824bd897e240af8a14f9d950ab6d95f42a5 Mon Sep 17 00:00:00 2001 From: Trevor Manz Date: Wed, 4 Oct 2023 07:05:20 -0400 Subject: feat(jupyter): send binary data with `Deno.jupyter.broadcast` (#20755) Adds `buffers` to the `Deno.jupyter.broadcast` API to send binary data via comms. This affords the ability to send binary data via websockets to the jupyter widget frontend. --- cli/js/40_jupyter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/js/40_jupyter.js') diff --git a/cli/js/40_jupyter.js b/cli/js/40_jupyter.js index 10dbccf4c..5a30a6b8e 100644 --- a/cli/js/40_jupyter.js +++ b/cli/js/40_jupyter.js @@ -9,8 +9,8 @@ function enableJupyter() { } = core.ensureFastOps(); globalThis.Deno.jupyter = { - async broadcast(msgType, content, { metadata = {} } = {}) { - await op_jupyter_broadcast(msgType, content, metadata); + async broadcast(msgType, content, { metadata = {}, buffers = [] } = {}) { + await op_jupyter_broadcast(msgType, content, metadata, buffers); }, }; } -- cgit v1.2.3