summaryrefslogtreecommitdiff
path: root/cli/js/40_jupyter.js
blob: ae257f1c1f54fbb3faf8781863e2912019bc56a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.

const core = globalThis.Deno.core;
const internals = globalThis.__bootstrap.internals;

function enableJupyter() {
  const {
    op_jupyter_broadcast,
  } = core.ensureFastOps();

  globalThis.Deno.jupyter = {
    async broadcast(msgType, content) {
      await op_jupyter_broadcast(msgType, content);
    },
  };
}

internals.enableJupyter = enableJupyter;