Conversation
cdba608 to
46ee1b2
Compare
46ee1b2 to
2ec929f
Compare
docs/api/structures/hid-device.md
Outdated
| * `productId` Integer - The USB product ID. | ||
| * `serialNumber` string (optional) - The USB device serial number. | ||
| * `guid` string (optional) - Unique identifier for the HID interface. A device may have multiple HID interfaces. | ||
| * `collections` Object[] - an array of report formats. See [Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/collections) for more. |
There was a problem hiding this comment.
Since this feature isn't a web standard and is only implemented in Chrome, is there a chance that the spec changes? I see on https://wicg.github.io/webhid/ the following paragraph:
This specification was published by the Web Platform Incubator Community Group. It is not a W3C Standard nor is it on the W3C Standards Track. Please note that under the W3C Community Contributor License Agreement (CLA) there is a limited opt-out and other conditions apply. Learn more about W3C Community and Business Groups.
Would it be beneficial to us to mark it as experimental?
There was a problem hiding this comment.
@erickzhao that text applies to all WebHID, not collections - imo it'd be a bit strange to mark this as experimental when no other part of WebHID is in our docs.
Co-authored-by: Erick Zhao <ezhao@slack-corp.com>
|
Release Notes Persisted
|
|
I have automatically backported this PR to "37-x-y", please check out #47483 |
|
I have automatically backported this PR to "36-x-y", please check out #47484 |
* feat: support HIDDevice.collections * Update docs/api/structures/hid-device.md Co-authored-by: Erick Zhao <ezhao@slack-corp.com> --------- Co-authored-by: Erick Zhao <ezhao@slack-corp.com>
Description of Change
Closes #43713
Improve spec adherence in the Web Hid API by properly supporting the
collectionsinstance properties. This allows developers to filter and make permissioning decisions based on for example theusagePageandusageproperties of a device inselect-hid-deviceand permission handlers.Checklist
npm testpassesRelease Notes
Notes: Added support for
HIDDevice.collections.