File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ const TriggerToolboxOverlay = Class(
9999
100100 // Initialize automation.
101101 harOverlay . initAutomation ( ) ;
102+ this . patchAutomation ( harOverlay . automation ) ;
102103 }
103104
104105 // This is a bit hacky, but the HarAutomation starts monitoring
@@ -124,6 +125,30 @@ const TriggerToolboxOverlay = Class(
124125 } ) ;
125126 } ,
126127
128+ /**
129+ * xxxHonza: this needs better platform API.
130+ * See also: https://github.com/firebug/har-export-trigger/issues/10
131+ */
132+ patchAutomation : function ( automation ) {
133+ let self = this ;
134+ automation . pageLoadDone = function ( response ) {
135+ Trace . sysout ( "HarAutomation.patchAutomation;" , response ) ;
136+
137+ if ( this . collector ) {
138+ this . collector . waitForHarLoad ( ) . then ( collector => {
139+ self . onPageLoadDone ( response ) ;
140+ return this . autoExport ( ) ;
141+ } ) ;
142+ }
143+ }
144+ } ,
145+
146+ onPageLoadDone : function ( response ) {
147+ Trace . sysout ( "TriggerToolboxOverlay.onPageLoadDone;" , response ) ;
148+
149+ this . front . pageLoadDone ( ) ;
150+ } ,
151+
127152 // Backend
128153
129154 /**
You can’t perform that action at this time.
0 commit comments