@@ -50,11 +50,11 @@ const InspectorOverlay = Class(
50
50
Trace . sysout ( "InspectorOverlay.initialize;" , options ) ;
51
51
52
52
// MarkupView events
53
- this . onMarkupViewRender = this . onMarkupViewRender . bind ( this ) ;
54
53
this . onMarkupViewLoaded = this . onMarkupViewLoaded . bind ( this ) ;
55
54
this . onMarkupViewUnloaded = this . onMarkupViewUnloaded . bind ( this ) ;
56
55
this . onMarkupMutation = this . onMarkupMutation . bind ( this ) ;
57
56
this . onInspectorUpdated = this . onInspectorUpdated . bind ( this ) ;
57
+ this . onMarkupViewContainerCreated = this . onMarkupViewContainerCreated . bind ( this ) ;
58
58
59
59
// Tooltip events
60
60
this . onClickTooltip = this . onClickTooltip . bind ( this ) ;
@@ -88,10 +88,10 @@ const InspectorOverlay = Class(
88
88
Trace . sysout ( "InspectorOverlay.onBuild;" , options ) ;
89
89
90
90
// Handle MarkupView events.
91
- this . panel . on ( "markupview-render" , this . onMarkupViewRender ) ;
92
91
this . panel . on ( "markuploaded" , this . onMarkupViewLoaded ) ;
93
92
this . panel . on ( "markupmutation" , this . onMarkupMutation ) ;
94
93
this . panel . on ( "inspector-updated" , this . onInspectorUpdated ) ;
94
+ this . panel . on ( "container-created" , this . onMarkupViewContainerCreated )
95
95
96
96
// Listen to {@FireQueryToolboxOverlay } events related to
97
97
// backend actor attach and detach.
@@ -177,17 +177,29 @@ const InspectorOverlay = Class(
177
177
} ,
178
178
179
179
onInspectorUpdated : function ( eventId , name ) {
180
- Trace . sysout ( "+++ InspectorOverlay.onInspectorUpdated; " + name , arguments ) ;
180
+ Trace . sysout ( "InspectorOverlay.onInspectorUpdated; " + name , arguments ) ;
181
181
} ,
182
182
183
183
onMarkupMutation : function ( eventId ) {
184
- Trace . sysout ( "+++ InspectorOverlay.onMarkupMutation; " , arguments ) ;
184
+ Trace . sysout ( "InspectorOverlay.onMarkupMutation; " , arguments ) ;
185
185
} ,
186
186
187
- onMarkupViewRender : function ( eventId , node , type , data , options ) {
188
- this . renderNode ( node , type , data ) ;
187
+ onMarkupViewContainerCreated : function ( eventId , container ) {
188
+ Trace . sysout ( "InspectorOverlay.onMarkupViewContainerCreated; " , arguments ) ;
189
+
190
+ let nodeFront = container . node ;
191
+ let hasJQueryData = nodeFront . getProperty ?
192
+ nodeFront . getProperty ( "hasJQueryData" ) :
193
+ nodeFront . _form . props . hasJQueryData ;
194
+
195
+ if ( ! hasJQueryData ) {
196
+ return ;
197
+ }
198
+
199
+ this . createDataIcon ( container . elt ) ;
189
200
} ,
190
201
202
+ // xxxHonza: TODO remove
191
203
renderNode : function ( node , type , data ) {
192
204
if ( type != "element" ) {
193
205
return ;
0 commit comments