How to access Jupyter object in javascript

How to access the Jupyter object in javascript ?

I see it documented in several documenation pages on Jupyter Javascript API, but when I open Chrome’s console or using %%javascript in ipythons kernel, I can’t access it.

Any pointers ? Many thanks!

Example references:

So I found something out, for others searching for the same: if one starts jupyter-lab with the --expose-app-in-browser, several JupyterLab` javascript objects become accessible:

  • jupyterlab
  • jupyterapp

Not sure yet what they do, and where they are documented … but it’s one step further :slight_smile:

1 Like

Have you seen GitHub - jtpio/ipylab: Control JupyterLab from Python Notebooks with Jupyter Widgets 🧪 ☢️ 🐍 ?

Thanks, yes I’ve seen it.

I’m actually trying to implement something similar (more like ipywidgets, but from a Go kernel.

I was hoping this would be doable without having to resort to code a JupyterLab extension – if I had access to the Jupyter javascript object. But from all I saw, it’s not that easy (likely due to security restrictions).