File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -113,11 +113,11 @@ export class BrowserContext
113113 }
114114 }
115115
116- onWorkerAttached ( cdpSession : CDPSession , worker : Worker , pageTargetId : string ) {
116+ onWorkerAttached ( cdpSession : CDPSession , workerTargetId : string , pageTargetId : string ) {
117117 this . subscribeToDevtoolsMessages ( cdpSession , {
118118 sessionType : 'worker' as const ,
119119 pageTargetId,
120- workerTargetId : worker . id ,
120+ workerTargetId,
121121 } ) ;
122122 }
123123
Original file line number Diff line number Diff line change @@ -288,14 +288,14 @@ export class Page extends TypedEventEmitter<IPuppetPageEvents> implements IPuppe
288288 const cdpSession = this . cdpSession . connection . getSession ( sessionId ) ;
289289
290290 if ( targetInfo . type === 'service_worker' || targetInfo . type === 'worker' ) {
291+ this . browserContext . onWorkerAttached ( cdpSession , targetInfo . targetId , this . targetId ) ;
291292 const worker = new Worker (
292293 this . browserContext ,
293294 this . networkManager ,
294295 cdpSession ,
295296 this . logger ,
296297 targetInfo ,
297298 ) ;
298- this . browserContext . onWorkerAttached ( cdpSession , worker , this . targetId ) ;
299299 const targetId = targetInfo . targetId ;
300300 this . workersById . set ( targetId , worker ) ;
301301
You can’t perform that action at this time.
0 commit comments