<@U0AJS60G1> How do I insert static JS loading int...
# datascience
a
@roman.belov How do I insert static JS loading into the notebook module configuration? Am I right that
DISPLAY(HTML(jetbrains.datalore.jupyter.configureScript()))
has something to do with that?
i
There is a kernel-specific extensions mechanics, which allows to do that https://jupyter-notebook.readthedocs.io/en/stable/extending/frontend_extensions.html
a
Thanks!
OK, I thought that there is a standard way to do so in jupyter-kotlin. In my particular case, I need a JS to be loaded on the page for visualization, how can I do it without changing the kernel code?
i
I'm intrigued with
jetbrains.datalore.jupyter.configureScript()
what is this ? 🙂
a
I found it in the lets-plot module configuration.
a
@altavir Yes, you can use DISPLAY(HTML()) in module configuration to load any js code when module is included. Lets-plot is initialized in this way
a
Could you briefly explain, what does
DISPLAY
function do?
i
a
I do not think that kotlin notebook uses python API inside, but thanks for the link. It is a good starting point.
a
@altavir It sends any content (e.g. text, html, dataframe, chart) for rendering in the output area of the cell that is being executed, but doesn't treat that object as a result of cell execution, so 'Out' variable is not set
HTML() function wraps string in a special object, that is rendered as html
a
Thanks. I understood about HTML since I read the sources, but DISPLAY makes a call to the external API and it was not quite easy to understand.