From 0db60ea8966502ce60a604463bc3927da97b73d2 Mon Sep 17 00:00:00 2001 From: Alex Rudenko Date: Thu, 4 Aug 2022 12:52:12 +0200 Subject: [PATCH] fix: specify the target filter in setDiscoverTargets To stay compatible with the next version of Chromium. See https://chromedevtools.github.io/devtools-protocol/tot/Target/#method-setDiscoverTargets --- src/common/ChromeTargetManager.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/common/ChromeTargetManager.ts b/src/common/ChromeTargetManager.ts index 3de8022cb02bb..db8cba7c100ef 100644 --- a/src/common/ChromeTargetManager.ts +++ b/src/common/ChromeTargetManager.ts @@ -101,7 +101,12 @@ export class ChromeTargetManager extends EventEmitter implements TargetManager { this.#connection.on('sessiondetached', this.#onSessionDetached); this.#setupAttachmentListeners(this.#connection); - this.#connection.send('Target.setDiscoverTargets', {discover: true}); + // TODO: remove `as any` once the protocol definitions are updated with the + // next Chromium roll. + this.#connection.send('Target.setDiscoverTargets', { + discover: true, + filter: [{type: 'tab', exclude: true}, {}], + } as any); } async initialize(): Promise {