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

Support for targetFilter in puppeteer.connect #228

Open
jmartin127 opened this issue Mar 24, 2023 · 2 comments
Open

Support for targetFilter in puppeteer.connect #228

jmartin127 opened this issue Mar 24, 2023 · 2 comments

Comments

@jmartin127
Copy link

jmartin127 commented Mar 24, 2023

The JavaScript puppeteer library has an optional parameter to the connect function called targetFilter (see here). The description of this feature is: Callback to decide if Puppeteer should connect to a given target or not.. This is also documented in their API document here.

This would be a valuable feature to add to the Dart puppeteer library as well. The reason this feature is useful, is that it would allow users of the library to filter out targets that puppeteer should ignore.

For my particular use case, I would like to prevent Puppeteer from loading existing pages in the browser when Puppeteer first connects (mostly for performance reasons).

Given that the Dart library already has TargetFilters, I feel the lift on this addition to the Dart library would be pretty light. If this seems reasonable to the maintainers of this project, I can put up a Pull Request with the proposed changes. Thank you.

@xvrh
Copy link
Owner

xvrh commented Mar 24, 2023

This seems reasonable, no problem to accept a pull request with a feature that matches the original puppeteer 👍

@jmartin127
Copy link
Author

This seems reasonable, no problem to accept a pull request with a feature that matches the original puppeteer 👍

Thank you for the quick response. I'll get going on the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants