mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
Added ViewWidget
This commit is contained in:
parent
399f11e2b2
commit
1b4e2ad6fe
@ -27,6 +27,8 @@ from IPython.utils.traitlets import Unicode, Dict, List, Instance, Bool
|
||||
from IPython.display import Javascript, display
|
||||
from IPython.utils.py3compat import string_types
|
||||
|
||||
from .widget_view import ViewWidget
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Classes
|
||||
#-----------------------------------------------------------------------------
|
||||
@ -436,3 +438,9 @@ class Widget(BaseWidget):
|
||||
self.send({"msg_type": "remove_class",
|
||||
"class_list": class_name,
|
||||
"selector": selector})
|
||||
|
||||
|
||||
def view(self, view_name=None):
|
||||
"""Return a widget that can be displayed to display this widget using
|
||||
a non-default view"""
|
||||
return ViewWidget(self, view_name)
|
||||
|
Loading…
Reference in New Issue
Block a user