mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 18:38:33 +00:00
feat(unstable): add Deno.jupyter.broadcast
API (#20656)
Closes https://github.com/denoland/deno/issues/20591 --------- Co-authored-by: Kyle Kelley <rgbkrk@gmail.com>
This commit is contained in:
parent
d39659332c
commit
46a4bd5178
13 changed files with 226 additions and 50 deletions
16
cli/js/40_jupyter.js
Normal file
16
cli/js/40_jupyter.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
||||
|
||||
const core = globalThis.Deno.core;
|
||||
const internals = globalThis.__bootstrap.internals;
|
||||
|
||||
import { denoNsUnstable } from "ext:runtime/90_deno_ns.js";
|
||||
|
||||
function enableJupyter() {
|
||||
denoNsUnstable.jupyter = {
|
||||
async broadcast(msgType, content) {
|
||||
await core.opAsync("op_jupyter_broadcast", msgType, content);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
internals.enableJupyter = enableJupyter;
|
Loading…
Add table
Add a link
Reference in a new issue