@@ -53,6 +53,8 @@ const InspectorOverlay = Class(
53
53
this . onMarkupViewRender = this . onMarkupViewRender . bind ( this ) ;
54
54
this . onMarkupViewLoaded = this . onMarkupViewLoaded . bind ( this ) ;
55
55
this . onMarkupViewUnloaded = this . onMarkupViewUnloaded . bind ( this ) ;
56
+ this . onMarkupMutation = this . onMarkupMutation . bind ( this ) ;
57
+ this . onInspectorUpdated = this . onInspectorUpdated . bind ( this ) ;
56
58
57
59
// Tooltip events
58
60
this . onClickTooltip = this . onClickTooltip . bind ( this ) ;
@@ -88,6 +90,8 @@ const InspectorOverlay = Class(
88
90
// Handle MarkupView events.
89
91
this . panel . on ( "markupview-render" , this . onMarkupViewRender ) ;
90
92
this . panel . on ( "markuploaded" , this . onMarkupViewLoaded ) ;
93
+ this . panel . on ( "markupmutation" , this . onMarkupMutation ) ;
94
+ this . panel . on ( "inspector-updated" , this . onInspectorUpdated ) ;
91
95
92
96
// Listen to {@FireQueryToolboxOverlay } events related to
93
97
// backend actor attach and detach.
@@ -172,6 +176,14 @@ const InspectorOverlay = Class(
172
176
this . nodes = [ ] ;
173
177
} ,
174
178
179
+ onInspectorUpdated : function ( eventId , name ) {
180
+ Trace . sysout ( "+++InspectorOverlay.onInspectorUpdated; " + name , arguments ) ;
181
+ } ,
182
+
183
+ onMarkupMutation : function ( eventId ) {
184
+ Trace . sysout ( "+++InspectorOverlay.onMarkupMutation; " , arguments ) ;
185
+ } ,
186
+
175
187
onMarkupViewRender : function ( eventId , node , type , data , options ) {
176
188
this . renderNode ( node , type , data ) ;
177
189
} ,
@@ -181,11 +193,18 @@ const InspectorOverlay = Class(
181
193
return ;
182
194
}
183
195
184
- let value ;
196
+ // Get custom 'hasJQueryData' property send from the backed.
197
+ // If the node has some jQuery data the property is set to true.
198
+ // xxxHonza: back compatibility, can be removed when
199
+ // Bug 1036949 - New API: MarkupView customization
200
+ // .. is in the release channel. It implements the
201
+ // nodeFront.getProperty() method.
185
202
let nodeFront = data . node ;
186
- let jQueryData = nodeFront . _form . jQueryData ;
203
+ let hasJQueryData = nodeFront . getProperty ?
204
+ nodeFront . getProperty ( "hasJQueryData" ) :
205
+ nodeFront . _form . props . hasJQueryData ;
187
206
188
- if ( ! jQueryData ) {
207
+ if ( ! hasJQueryData ) {
189
208
return ;
190
209
}
191
210
0 commit comments