@@ -65,9 +65,9 @@ def show(self, widget):
65
65
<li>{ widget .__class__ .__doc__ .replace ("<" , "<" )}
66
66
{ self .get_attrs (widget )}
67
67
{ self .get_classes (widget )}
68
+ <li>id = { widget .attr ("id" )}
68
69
<li>{ self .get_creation_link (widget )}
69
70
<li>{ widget .children ().length } children
70
- { self .get_css (widget )}
71
71
""" )
72
72
details_left = max (0 , left - self .details .outerWidth () + 2 ) \
73
73
if left + width > find ("body" ).width () * 3 / 4 else left + width - 2
@@ -81,19 +81,9 @@ def hide(self):
81
81
self .right .css ("display" , "none" )
82
82
self .details .css ("display" , "none" )
83
83
84
- def get_css (self , widget ):
85
- """ Show the CSS of a widget """
86
- js_styles = window .getStyle (widget .element )
87
- return "<li> css:<pre style='font-size: 12px;'>" + window .JSON .stringify (js_styles , None , 4 ) + "</pre>"
88
-
89
84
def get_classes (self , widget ):
90
85
""" Show the classes of a widget """
91
- result = []
92
- for name , value in widget .__class__ .__dict__ .items ():
93
- if name .startswith ("_" ) or name in INSPECT_IGNORE_ATTRIBUTES :
94
- continue
95
- result .append (f"{ name } = { value } " )
96
- return ("<li>" if result else "" ) + "<li>" .join (result )
86
+ return f"<li>classes = [{ ', ' .join (widget .element [0 ].classList .toString ().split ())} ]<//li>"
97
87
98
88
def get_attrs (self , widget ):
99
89
""" Show the attributes of a widget """
0 commit comments