demo · v131
WebHID inside Dedicated Workers
High-volume input devices (MIDI controllers, drawing tablets, racing wheels) can finally be polled off the main thread. Run the probe to see the API surface in this page and in a freshly-spawned worker.
main thread
-
dedicated worker
-
the api
// In a Worker (Chrome 131+):
self.addEventListener("message", async () => {
const devices = await navigator.hid.getDevices();
postMessage({ count: devices.length });
});