I am using the Jupyter Notebook, and am trying to create a widget, based on a template found on Github.
The template uses at some point the magic %%javascript
. This works fine when directly pasted in the cells of the notebook.
However when I tried to make a function out of the widget, having the %%javascript
expression makes it returns the error:
%%javascript SyntaxError: invalid syntax
Anyone knows how to "convert" the magic command so that it can be invoked properly from within a function (the function is saved in a separate file)