Open flying-sheep opened 5 years ago
Widget._ipython_display_() just creates plaintext and the widget mimetype.
Widget._ipython_display_()
subclassing widgets should have a way to inject their own.
For this, we should replace the use of _ipython_display_ with the use of _repr_mimebundle_. Then we can do:
_ipython_display_
_repr_mimebundle_
def MyWidget(Widget): def _repr_mimebundle_(self): return { **super()._repr_mimebundle_(), 'text/latex': ... }
Thanks. I think the plan is to make this switch for the next major release, c.f. https://github.com/jupyter-widgets/ipywidgets/issues/1811.
Widget._ipython_display_()
just creates plaintext and the widget mimetype.subclassing widgets should have a way to inject their own.
For this, we should replace the use of
_ipython_display_
with the use of_repr_mimebundle_
. Then we can do: