Closed beaufortfrancois closed 1 year ago
Why do requestDevice
and Peromission API treat the excludionFilters
options differently? requestDevice
doesn't allow it to be an empty array, and didn't check whether it was set in step 7. I think an empty array should behavior the same as not set.
LGTM with nits. I agree that we probably should unify the behavior between
requestDevice()
and the Permissions API integration. Of course the latter is a bit aspirational since it isn't implemented in any browser engine.
Thank you! I've addressed your nits.
Would it be okay to land this as is and file a spec issue to unify the behaviour between requestDevice()
and the Permissions API?
FYI I've started implementing this change in Chromium at https://chromium-review.googlesource.com/c/chromium/src/+/4614682.
Once the spec is updated, I'll start an intent to ship if that looks good to you @reillyeon
Would it be okay to land this as is and file a spec issue to unify the behaviour between
requestDevice()
and the Permissions API?
Yes.
@reillyeon Can you merge?
The new "exclusionFilters" option in
navigator.usb.requestDevice()
allows web developers to exclude some devices from the browser picker. It can be used to exclude devices that match a broader filter but are unsupported, or are already connected for instance.Please have a look @reillyeon
FIX: https://github.com/WICG/webusb/issues/232
Preview | Diff