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

Add web command to request usb access #151795

Merged
merged 1 commit into from
Jun 13, 2022
Merged

Add web command to request usb access #151795

merged 1 commit into from
Jun 13, 2022

Conversation

mjbvz
Copy link
Collaborator

@mjbvz mjbvz commented Jun 10, 2022

This experimental command triggers a request for usb devices. After the user selects these, extensions under the extension host can access them using navigator.usb.getDevices(...)

@mjbvz mjbvz added this to the June 2022 milestone Jun 10, 2022
@mjbvz mjbvz requested a review from alexdima June 10, 2022 21:04
@mjbvz mjbvz self-assigned this Jun 10, 2022
@bpasero
Copy link
Member

bpasero commented Jun 11, 2022

I think contrib is a bit overkill for this, if we think as a platform web USB should be supported, I would make this an official extension command somewhere where other extension commands contribute from core.

alexdima
alexdima previously approved these changes Jun 13, 2022
Copy link
Member

@alexdima alexdima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Nice! works for me with await navigator.usb.getDevices(). I've tested in the extension host web worker context.

This experimental command triggers a request for usb devices. After the user selects these, extensions under the extension host can access them using `navigator.usb.getDevices(...)`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants