WebHIDLimited availability
The WebHID API provides access to Human Interface Devices (HID) that are connected to the user's device.
Not yet supported in all major browsers — check the table and provide a fallback.
Browser support
DesktopChrome
1–88Not supported
89+Supportedsince Mar 2, 2021
Current: 155Edge
12–88Not supported
89+Supportedsince Mar 4, 2021
Current: 154Firefox
✕Not supportedup to 157
Current: 157Safari
✕Not supportedup to 27
Current: 27MobileChrome Android
✕Not supportedup to 155
Current: 155Firefox Android
✕Not supportedup to 157
Current: 157Safari iOS
✕Not supportedup to 27
Current: 27How to use
Not supported in Firefox, Safari, Chrome Android, Firefox Android, Safari iOS. Use feature detection below and provide a fallback (or a polyfill) for those browsers.
Example
Full syntax and examples are on MDN: HID.
Feature detection
JS · check before using
if ("HID" in globalThis) {
// HID is available
} else {
// load a polyfill or use a fallback
}Documentation (MDN)
Specification
Usage share
Sub-features
Support for each part of the feature (33). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| HID | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |
| HID.connect_event | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |
| HID.disconnect_event | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |
| HID.getDevices | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |
| HID.requestDevice | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |
| HID.worker_support | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| HIDConnectionEvent | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |
| HIDConnectionEvent.HIDConnectionEvent | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |
| HIDConnectionEvent.device | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |
| HIDConnectionEvent.worker_support | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| HIDDevice | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |
| HIDDevice.close | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |
| HIDDevice.collections | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |
| HIDDevice.forget | 100 | 100 | ✕ | ✕ | ✕ | ✕ | ✕ |
| HIDDevice.inputreport_event | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |
| HIDDevice.open | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |
| HIDDevice.opened | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |
| HIDDevice.productId | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |
| HIDDevice.productName | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |
| HIDDevice.receiveFeatureReport | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |
Show 13 more
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| HIDDevice.sendFeatureReport | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |
| HIDDevice.sendReport | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |
| HIDDevice.vendorId | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |
| HIDDevice.worker_support | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| HIDInputReportEvent | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |
| HIDInputReportEvent.data | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |
| HIDInputReportEvent.device | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |
| HIDInputReportEvent.reportId | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |
| HIDInputReportEvent.worker_support | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| Navigator.hid | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |
| WorkerNavigator.hid | 131 | 131 | ✕ | ✕ | ✕ | ✕ | ✕ |
| iframe.allow.hid | 89 | 89 | ✕ | ✕ | 89 | ✕ | ✕ |
| http.headers.Permissions-Policy.hid | 89 | 89 | ✕ | ✕ | ✕ | ✕ | ✕ |