deathbeds/jyve

Inserting iframes in new widget?

gnestor opened this issue · 2 comments

I understand that each kernel is sandboxed to its own iframe, but do these iframes need to create a new widget? Could they be inserted in lab's body with 0x0 dimensions?

Ok, I understand. Ideally, we want these kernels to behave like other kernels in that the output of cell x is rendered in the output area of cell x.

This could work by creating an iframe element just for sandboxing purposes and then running all input code using eval and then rendering the result of that in the output. The iframe in this case wouldn't be attached or appended to a widget.

If the result of evaluating the input is an HTMLElement, then we append it to the output area. If it's a ReactElement, we ReactDOM.render it in there. We can handle those type of known cases and then render everything else as a string.

I like being able to restart a jyve kernel, but the way to do that should be consistent with how it's done with other kernels ((e.g. "Restart kernel").

I'm willing to help with this stuff, just wanna hash out out first. I really want a legit JS and Pyodide kernel 👍