Javascript functionality within Jupyter notebook from IPython.display

Hello,

I have a process wherein consecutive cells need to be executed in a jupyter notebook that interacts with Slicer (using SlicerJupyter extension).

I basically have something like

from IPython.display import Javascript
display(Javascript(“IPython.notebook.execute_cells_below()”))

This used to work perfectly in Slicer 4.11, but I am unable to replicate it in the newer 5.6.1 and 5.6.2 versions.

The error is “Javascript Error: display is not defined”

Does anyone have any insights on this? This is for a time sensitive project, so I would appreciate any help! Thank you in advance.

Best,
Sharada