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

Expose setter for TargetInfo type #201

Closed
elliette opened this issue Dec 6, 2022 · 2 comments · Fixed by #202
Closed

Expose setter for TargetInfo type #201

elliette opened this issue Dec 6, 2022 · 2 comments · Fixed by #202

Comments

@elliette
Copy link
Contributor

elliette commented Dec 6, 2022

See puppeteer/puppeteer#9371 for context and more details.

Ideally this is something that should be fixed by Puppeteer. Currently the only way to use Puppeteer to interact with a Chrome DevTools panel added by a Chrome Extension is to set the TargetInfo's type to be a page. I've opened up puppeteer/puppeteer#9371 in Puppeteer itself to request official support for this use case.

In the meantime, would it be possible to expose a setter (alongside the type getter) to allow clients to coerce the type of a Target?

@xvrh
Copy link
Owner

xvrh commented Dec 6, 2022

@elliette feel free to open a pull request with your idea. I don't see any problem with this if it enable new use cases.

@elliette
Copy link
Contributor Author

elliette commented Dec 7, 2022

@elliette feel free to open a pull request with your idea. I don't see any problem with this if it enable new use cases.

Thanks! I opened #202

@xvrh xvrh closed this as completed in #202 Dec 8, 2022
xvrh pushed a commit that referenced this issue Dec 8, 2022
Resolves #201

Adds a `type` setter on `Target` which sets the `TargetInfo` type.
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

Successfully merging a pull request may close this issue.

2 participants