Open franktoffel opened 11 months ago
We don't support importing of external JavaScript, for two main reasons:
alert()
, and it would be tremendous amount of effort to implement IDE/console-like functionality to help creators debug anything they try.It looks like Pyodide uses WebAssembly, so if it could even be loaded to the visual, there may be further issues here with the sandboxing that may prevent it from running (although this is untested; I haven't come across any custom visuals that successfully use WebAssembly so there would likely be significant R&D here to explore whether this is even possible).
Typically, anything that relies heavily on a specific JS package (or a number of them) would be better done as a proper custom visual, as you would get much more control over the dataset, DOM and the workflow than a generic visual such as this one might do.
Pyodide is the leading package to bring Python to web-browser without the need of a backend.
https://pyodide.org/en/stable/index.html
I wasn't able to complete the minimum examples in PowerBI html_python_js.xlsx
I wonder if this will be possible (not sure if JavaScript libraries can be imported).