Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: specify the target filter in setDiscoverTargets #8742

Merged
merged 1 commit into from Aug 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/common/ChromeTargetManager.ts
Expand Up @@ -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);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

happy to type it out as an explicit type but I guess any is okay as it's only till the next roll

}

async initialize(): Promise<void> {
Expand Down