@@ -8,26 +8,35 @@ window.cls || (window.cls = {});
88cls . EventName = function ( name )
99{
1010 this . name = name ;
11- this . model = null ;
1211 this . rt_listeners = null ;
1312 this . is_expanded = false ;
1413 this . rt_id = 0 ;
1514 this . obj_id = 0 ;
15+ this . _init ( ) ;
1616} ;
1717
18- cls . EventName . prototype = new function ( )
18+ cls . EventNamePrototype = function ( )
1919{
2020 var SEARCH_TYPE_EVENT = 5 ;
2121
2222 this . search_dom = function ( rt_id , obj_id , ev_name , cb )
2323 {
24- this . rt_id = rt_id ;
25- this . obj_id = obj_id ;
26- this . model = new cls . InspectableDOMNode ( rt_id , obj_id ) ;
27- this . model . search ( ev_name , SEARCH_TYPE_EVENT , 0 , 0 , cb ) ;
24+ this . rt_id = this . _data_runtime_id = rt_id ;
25+ this . obj_id = this . _root_obj_id = obj_id ;
26+ this . search ( ev_name , SEARCH_TYPE_EVENT , 0 , 0 , cb ) ;
27+ } ;
28+
29+ this . collapse = function ( )
30+ {
31+ this . _data = [ ] ;
32+ this . rt_listeners = null ;
33+ this . is_expanded = false ;
2834 } ;
2935} ;
3036
37+ cls . EventNamePrototype . prototype = cls . EcmascriptDebugger [ "6.0" ] . InspectableDOMNode . prototype ;
38+ cls . EventName . prototype = new cls . EventNamePrototype ( ) ;
39+
3140cls . RTListUpdateCTX = function ( rt_id_list , cb )
3241{
3342 this . _init ( rt_id_list , cb ) ;
@@ -234,10 +243,10 @@ cls.EvenetListeners.prototype = new function()
234243 var OBJECT_ID = 0 ;
235244 var EVENT_LISTENERS = 1 ;
236245 var ev_target = message [ TARGET_LIST ] && message [ TARGET_LIST ] [ 0 ] ;
237- ev_name_obj . model . window_listeners = ev_target
238- ? { win_id : ev_target [ OBJECT_ID ] ,
239- listeners : ev_target [ EVENT_LISTENERS ] }
240- : null ;
246+ ev_name_obj . window_listeners = ev_target
247+ ? { win_id : ev_target [ OBJECT_ID ] ,
248+ listeners : ev_target [ EVENT_LISTENERS ] }
249+ : null ;
241250 ev_name_obj . is_expanded = true ;
242251
243252 if ( ! this . _expand_tree [ ev_name_obj . rt_id ] )
@@ -328,10 +337,7 @@ cls.EvenetListeners.prototype = new function()
328337 var ev_n_obj = this . _get_ev_name_obj ( rt_id , ev_name ) ;
329338 if ( ev_n_obj )
330339 {
331- ev_n_obj . model = null ;
332- ev_n_obj . rt_listeners = null ;
333- ev_n_obj . is_expanded = false ;
334-
340+ ev_n_obj . collapse ( ) ;
335341 if ( this . _expand_tree [ rt_id ] )
336342 this . _expand_tree [ rt_id ] [ ev_name ] = false ;
337343 }
0 commit comments