How in Javascript to send a `comm_info` to the Kernel?

I’m trying to build something similar to ipywidgets but to the GoNB kernel, and I’m trying to figure out how to communicate from Javascript in the notebook to the kernel.

Any pointers ?

The Kernel Message protocol suggests that there is comm_info messages for that – also I saw them passing by when playing ipywidgets (in Python).

But how from Javascript (from an HTML widget) I tell Jupyter notebook to send this message to the kernel ?

many thanks!

p.s.: I did find the page on Javascript Notebook Extensions, but it doesn’t explicitly say, plus it doesn’t work – for instance the object Jupyter doesn’t exist in the javascript context (in the browser console or if using the %%javascript tag in ipython).

I managed to solve this for the GoNB kernel I’ve been developing.

For others similarly looking for how to make front-end connect to kernel/users’s cell program:

1 Like