How to call `createComm` from JS without breaking ipywidgets

Since I managed to narrow down my initial issue, I’m creating another topic to focus on a possible solution.

The first extension that creates a KernelConnection can createComm but not the following one(s). When I delay my extension, ipywidgets works, but my extension fails with Error: Comms are disabled on this kernel connection. If I let it run, my extension works but ipywidgets now runs into that same error.


  1. What is the recommended way to call createComm on the JS side when you already know the kernel_id? My code: KernelConnection on which I call createComm much later

  2. Is there any global JS object on which I could reuse a KernelConnection on which createComm would work and not disrupt ipywidgets?

  3. Any other suggestions or path for calling createComm.