@@ -125,9 +125,7 @@ class BrowserRecorder extends Recorder {
125125 }
126126
127127 if ( numOtherRecorders > 0 ) {
128- console . log (
129- `closing session, not detaching, ${ numOtherRecorders } other recording tab(s) left` ,
130- ) ;
128+ console . log ( `closing session, not detaching, ${ numOtherRecorders } other recording tab(s) left` ) ;
131129 return this . sessionClose ( [ ] ) ;
132130 } else {
133131 console . log ( "detaching debugger, already tabs stopped" ) ;
@@ -236,9 +234,7 @@ class BrowserRecorder extends Recorder {
236234 this . doUpdateStatus ( ) ;
237235 } catch ( msg ) {
238236 // @ts -expect-error - TS2339 - Property 'failureMsg' does not exist on type 'BrowserRecorder'.
239- this . failureMsg = chrome . runtime . lastError
240- ? chrome . runtime . lastError . message
241- : msg ;
237+ this . failureMsg = chrome . runtime . lastError ? chrome . runtime . lastError . message : msg ;
242238 this . doUpdateStatus ( ) ;
243239 throw msg ;
244240 }
@@ -343,7 +339,10 @@ class BrowserRecorder extends Recorder {
343339 // @ts -expect-error - TS2339 - Property 'db' does not exist on type 'BrowserRecorder'.
344340 if ( this . db ) {
345341 // @ts -expect-error - TS2339 - Property 'db' does not exist on type 'BrowserRecorder'.
346- return this . db . addPage ( pageInfo ) ;
342+ const result = this . db . addPage ( pageInfo ) ;
343+
344+ chrome . runtime . sendMessage ( { type : "pageAdded" } ) ;
345+ return result ;
347346 }
348347 }
349348
@@ -372,9 +371,7 @@ class BrowserRecorder extends Recorder {
372371 prr . resolve ( res ) ;
373372 } else {
374373 // @ts -expect-error - TS7005 - Variable 'prr' implicitly has an 'any' type.
375- prr . reject (
376- chrome . runtime . lastError ? chrome . runtime . lastError . message : "" ,
377- ) ;
374+ prr . reject ( chrome . runtime . lastError ? chrome . runtime . lastError . message : "" ) ;
378375 }
379376 } ;
380377
0 commit comments