PSA: WebUSB in Extension Service Workers

59 views
Skip to first unread message

Ajay Rahatekar

unread,
Apr 10, 2023, 7:33:13 PM4/10/23
to blink-dev, Jack Hsieh, Matt Reynolds, hongchan, Reilly Grant

Contact emails

chen...@chromium.org


Explainer

https://github.com/WICG/webusb/blob/main/extension-service-worker-explainer.md


Specification

https://wicg.github.io/webusb


Summary

Allows web developers to use WebUSB API when responding to extension events by exposing WebUSB API to Service Workers registered by browser extensions. This API will not yet be exposed to Service Workers registered by sites but the implementation experience gained by supporting the API for extensions will be valuable for such a future project.


Blink component

Blink>USB


Risks

Interoperability and Compatibility


Gecko: Negative (https://github.com/mozilla/standards-positions/issues/100) Mozilla has not provided a position on this feature but their position on WebUSB is negative


WebKit: Negative (https://github.com/WebKit/standards-positions/issues/68) Apple has not implemented WebUSB due to concerns about fingerprinting


Web developers: No signals


Other signals: Extension team approves of exposing these APIs to extension service workers. (https://docs.google.com/document/d/1s01BVkz-mb18p-gwXmzhM6DdioOh0JMzx_kCJzsLd7U/preview, internal-only)


WebView application risks

None, WebUSB is not available in WebViews.


Debuggability

Devtools



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

No


Is this feature fully tested by web-platform-tests?

No, testing for Extensions is covered by Chrome browser tests but the WebUSB API in general is fully tested by web-platform-tests.



Flag name

chrome://flags/#enable-web-usb-on-extension-service-worker


Requires code in //chrome?

True


Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1303193


Launch bug

https://launch.corp.google.com/launch/4200812 (sorry, Googlers only)


Estimated milestones

115


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5200265459269632


Links to previous Intent discussions

Intent to prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAKfE4f%2Bi4m3rOBF4m-yQVAwau3ghnMS_jkj6Bis5LP5eeYjfzw%40mail.gmail.com


Reply all
Reply to author
Forward
0 new messages