mirror of
https://github.com/denoland/deno.git
synced 2025-07-24 13:44:08 +00:00
fix(jupyter): more robust Deno.jupyter namespace (#20710)
This commit is contained in:
parent
35fad4d2bc
commit
0bd53fd52d
4 changed files with 82 additions and 63 deletions
|
@ -3,12 +3,14 @@
|
|||
const core = globalThis.Deno.core;
|
||||
const internals = globalThis.__bootstrap.internals;
|
||||
|
||||
import { denoNsUnstable } from "ext:runtime/90_deno_ns.js";
|
||||
|
||||
function enableJupyter() {
|
||||
denoNsUnstable.jupyter = {
|
||||
const {
|
||||
op_jupyter_broadcast,
|
||||
} = core.ensureFastOps();
|
||||
|
||||
globalThis.Deno.jupyter = {
|
||||
async broadcast(msgType, content) {
|
||||
await core.opAsync("op_jupyter_broadcast", msgType, content);
|
||||
await op_jupyter_broadcast(msgType, content);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue