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
feat: add option to filter targets #7192
Conversation
Co-authored-by: Mathias Bynens <mathias@qiwi.be>
I have no idea how this PR works or what the changes mean, but in the release change log for version 9.1.0 this PR is the only one in that release. Unscientifically, I found that our test suite stopped being so busted when we downgraded back to puppeteer 9.0.0. |
Hi @peterbe Thanks for bringing this to my attention! |
@peterbe Thanks for pinging - I think this is related to the fact that the filter can be async. I'll verify that now... |
What's a "filter" :) |
By default, puppeteer connects to all available targets (=pages and workers etc.). We wanted to give developers a way to control which ones to connect because puppeteer enables some CDP domains by default which might interfere with what that target is doing. |
Yeah I have just raised issue #7204 which turns out to be due to this. |
This change closes #7191 by introducing a callback that can be used to decide if puppeteer should connect to a given target.