Skip to content

Commit

Permalink
fix: do not wait for extension page targets on connect (#12574)
Browse files Browse the repository at this point in the history
  • Loading branch information
OrKoN authored Jun 12, 2024
1 parent 0057f3f commit 5f2ee98
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/puppeteer-core/src/cdp/ChromeTargetManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,15 @@ export class ChromeTargetManager
this,
undefined
);
// Targets that will not be auto-attached. Therefore, we should
// not add them to #targetsIdsForInit.
const skipTarget =
targetInfo.type === 'browser' ||
targetInfo.url.startsWith('chrome-extension://');
if (
(!this.#targetFilterCallback ||
this.#targetFilterCallback(targetForFilter)) &&
targetInfo.type !== 'browser'
!skipTarget
) {
this.#targetsIdsForInit.add(targetId);
}
Expand Down

0 comments on commit 5f2ee98

Please sign in to comment.