summaryrefslogtreecommitdiff
path: root/cli/js/40_jupyter.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-09-28 16:51:44 +0200
committerGitHub <noreply@github.com>2023-09-28 16:51:44 +0200
commit0bd53fd52d8937afed401fe1c61bb2ba0b23501c (patch)
tree4bba498372accf7fc0a3d2fca7ea3f99329f8f1f /cli/js/40_jupyter.js
parent35fad4d2bc022b7053b5390ec1fb47ca28f4086e (diff)
fix(jupyter): more robust Deno.jupyter namespace (#20710)
Diffstat (limited to 'cli/js/40_jupyter.js')
-rw-r--r--cli/js/40_jupyter.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/cli/js/40_jupyter.js b/cli/js/40_jupyter.js
index 8cdf0789a..ae257f1c1 100644
--- a/cli/js/40_jupyter.js
+++ b/cli/js/40_jupyter.js
@@ -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);
},
};
}