-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Chromium only partially supports WebUSB API in web workers #24639
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please provide more details?
- The source code link points only to the webusb directory.
- Can you share the test you used, and did you also test in an older Chrome?
Because all webusb features is under this folder, and list all webuse idl files is awful. And most idl files are in the same expose scope. like https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/webusb/usb.idl.
The test is check if the specific interface is exposed to one of the worker scope. Also, I found I make a mistake, that the feature is also available in WebExtension service workers. see https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/runtime_enabled_features.json5;l=4850 And as #24538 did, I've instead to use a separate
Not at this moment. |
Summary
the WebUSB API is not exposed to shared worker and service worker (except for webextension service workers) in chromium, which should be according to the spec
no related browser issue is found
see chromium source code
this can be test using https://worker-playground.glitch.me/
Note: I'm not sure if partial_implementation or impl_url key should be added or notso full chain is:
expose to dedicated worker (M70)
chromium/chromium@841d469
chromium/chromium@3267532
chromium/chromium@6ed4277
https://chromium-review.googlesource.com/c/chromium/src/+/1014196
https://chromium-review.googlesource.com/c/chromium/src/+/1053063
https://chromium-review.googlesource.com/c/chromium/src/+/1153222
https://issues.chromium.org/issues/40573868
https://issues.chromium.org/issues/40575664
https://chromestatus.com/feature/5928209916887040
expose to webextension service worker (M118)
chromium/chromium@cf53ee2
https://chromium-review.googlesource.com/c/chromium/src/+/3894652
https://issues.chromium.org/issues/40217296
https://chromestatus.com/feature/5200265459269632
Test results and supporting details
Related issues