jupyter-widgets / ipywidgets

Interactive Widgets for the Jupyter Notebook
https://ipywidgets.readthedocs.io
BSD 3-Clause "New" or "Revised" License
3.14k stars 949 forks source link

proposition of iframe widget #2264

Open oscar6echo opened 5 years ago

oscar6echo commented 5 years ago

I just published a custom iframe widget: ipyiframe.
I could make a PR to make it a core widget.
If there is an interest please let me know.

Note that I force the sandbox attribute to allow-scripts only, which I understand makes the embedded content sealed enough and therefore the widget secure.
Irrespective of whether such widget should be core, I would be very interested in expert's feedback on security.

luca1308 commented 4 years ago

Hey Oscar, nice work. I used it to load some pyplot graphs into my notebook. Unfortunately, when wanting to display it within an accordion widget, it is blank.

Do you know what this could be about? It looks normal when displaying it not within another widget.

Edit.: I guess it doesn't load if the accordion isn't selected/opened when initializing the code.

oscar6echo commented 4 years ago

@luca1308 I made the same observations. I don't know why but did not really inquire as I see jupyter widget as a convenient but limited way to build simple interactive screen sections. When hitting the limits, I prefer using native web (html, css, js).

Now in order to investigate this behavior, I would use the browser dev tools and manually tamper the page to make it work as expected...

luca1308 commented 4 years ago

@luca1308 I made the same observations. I don't know why but did not really inquire as I see jupyter widget as a convenient but limited way to build simple interactive screen sections. When hitting the limits, I prefer using native web (html, css, js).

Now in order to investigate this behavior, I would use the browser dev tools and manually tamper the page to make it work as expected...

Okay, thanks. I think I will just mark them as selected.

luca1308 commented 4 years ago

Hey Oscar, I will probably use ipyiframe in my thesis and will mention it in a short table of notable packages in the end. Could I get your real name, or should I stick with your nick?

oscar6echo commented 4 years ago

Glad this tiny package helped even a bit.
oscar6echo is my cyber self ;)

flying-sheep commented 10 months ago

The package doesn’t seem to work anymore.

I can’t see it in the list of installed plugins after installing the PyPI package into the same environment jupterlab and jupyter-core live in.

Since this package is linked from the docs, maybe it would be good to bring it in.