← Back to release summary

WebUSB in Extension Service Workers

Category
Device
Type
New or changed feature
Status
Enabled by default (Chrome 118)
Intent stage
Prepare to ship

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.

Motivation

As Chrome Apps API chrome.usb will soon be deprecated, developers are encouraged to migrate to web apps or Chrome Extensions. For the Chrome Extension case, manifest V3 deprecates the background page and recommends developers to migrate to service workers. As a result, it is required to support WebUSB in service workers.

Standards & signals

Explainers: https://github.com/nondebug/webusb/blob/service-worker-explainer/extension-service-worker-explainer.md

View on chromestatus.com