-
Notifications
You must be signed in to change notification settings - Fork 22.8k
Open
Labels
Content:WebAPIWeb API docsWeb API docsgoal: up-to-date(Experimental label) Issues about outdated content.(Experimental label) Issues about outdated content.needs BCD updateRequires changes in BCD mdn/browser-compat-dataRequires changes in BCD mdn/browser-compat-data
Description
MDN URL
https://developer.mozilla.org/en-US/docs/Web/API/USB/requestDevice
What specific section or headline is this issue about?
Parameters
What information was incorrect, unhelpful, or incomplete?
The current documentation on MDN incorrectly states the USB requestDevice
method takes an array of filters as the only parameter. However, the requestDevice
method takes an object with a property filters
which is an array.
Current version (minus some bits to make viewable here.)
## Syntax
requestDevice(filters)
### Parameters
- `filters`
- : An array of filter objects for possible devices you would like to pair. Each filter
object can have the following properties:
- `vendorId`
- `productId`
- `classCode`
- `subclassCode`
- `protocolCode`
- `serialNumber`
What did you expect to see?
Corrected version (minus some bits to make viewable here.)
## Syntax
requestDevice(options)
### Parameters
- `options`
- : An object that sets options for selecting an appropriate device.
The available options are:
- `filters`
- : An array of filter objects for possible devices you would like to pair. Each filter
object can have the following properties:
- `vendorId`
- `productId`
- `classCode`
- `subclassCode`
- `protocolCode`
- `serialNumber`
Do you have any supporting links, references, or citations?
The correct parameters can be seen on the below link that confirms this issue.
Device Enumeration
Do you have anything more you want to share?
I will push a pull request to fix this shortly.
Metadata
Metadata
Assignees
Labels
Content:WebAPIWeb API docsWeb API docsgoal: up-to-date(Experimental label) Issues about outdated content.(Experimental label) Issues about outdated content.needs BCD updateRequires changes in BCD mdn/browser-compat-dataRequires changes in BCD mdn/browser-compat-data