puppeteer-dart
puppeteer-dart copied to clipboard
Support for targetFilter in puppeteer.connect
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.
This seems reasonable, no problem to accept a pull request with a feature that matches the original puppeteer 👍
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.