summaryrefslogtreecommitdiff
path: root/runtime/js/99_main.js
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/js/99_main.js')
-rw-r--r--runtime/js/99_main.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js
index 15e4936b1..d2a28838a 100644
--- a/runtime/js/99_main.js
+++ b/runtime/js/99_main.js
@@ -545,12 +545,19 @@ function bootstrapMainRuntime(runtimeOptions) {
// TODO(bartlomieju): this is not ideal, but because we use `ObjectAssign`
// above any properties that are defined elsewhere using `Object.defineProperty`
// are lost.
+ let jupyterNs = undefined;
ObjectDefineProperty(finalDenoNs, "jupyter", {
get() {
+ if (jupyterNs) {
+ return jupyterNs;
+ }
throw new Error(
"Deno.jupyter is only available in `deno jupyter` subcommand.",
);
},
+ set(val) {
+ jupyterNs = val;
+ },
});
}