ipywidgets_server
ipywidgets_server copied to clipboard
Handle clear output messages
(Sorry, I don't have any experience with JS and HTML)
I've built a plotting widget in a Jupyter Notebook using bqplot. It uses IPython.display.clear_output() to redraw everything, which doesn't work on ipywidgets_server. Is there any other way clear the output?
And is it possible to embed a widget from ipywidgets_server in a web page?
At the moment, we don't catch the clear_output messages on the frontend, but that sounds like something we should do.
PRs welcome! If anyone wants to tackle this, shout out here and I can try to come up with more detail.
As a work-around, I suggest embedding your widget in a container (like an HBox or a VBox) and changing that container's children instead of clearing the output.
I replied to your second question in a separate issue (issue #40) for greater discoverability.
Thanks, I've tried it before but haven't succeeded. I'll try more and if I manage that I'll write here my solution.