LGTM1
On 6/21/23 2:32 AM, 'François Beaufort' via blink-dev wrote:
Contact emails
*
fbeauf...@google.com <mailto:fbeauf...@google.com>
reil...@google.com <mailto:reil...@google.com>
*
Explainer
*
https://github.com/WICG/webusb/pull/233#issue-1760530134
<https://github.com/WICG/webusb/pull/233#issue-1760530134>
*
Specification
*
https://wicg.github.io/webusb/#dom-usbdevicerequestoptions-exclusionfilters
<https://wicg.github.io/webusb/#dom-usbdevicerequestoptions-exclusionfilters>
https://github.com/WICG/webusb/pull/233
<https://github.com/WICG/webusb/pull/233>
*
Summary
*
The "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.
*
Blink component
*
Blink>USB
<https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink%3EUSB>
*
Motivation
*
Allowing web developers, through the "exclusionFilters"
option, to exclude from the browser picker some devices that
are not supported by the site will improve user experience.
Without it, web developers let users pick a device, then have
to check using a custom JavaScript helper function and alert
the user after they’ve already selected a device, resulting in
a poor user experience.
// Request access to a device from vendor ID 0xABCD.
// The device with product ID 0x1234 has been reported as
unsupported.
constdevice = awaitnavigator.usb.requestDevice({
filters: [{ vendorId: 0xABCD}],
exclusionFilters: [{ vendorId: 0xABCD, productId: 0x1234}],
});
This feature is similar to Web Bluetooth and WebHID
"exclusionFilters" options. See
https://chromestatus.com/features#exclusionFilters
<https://chromestatus.com/features#exclusionFilters>
*
TAG review
*
This small addition to the WebUSB API doesn’t seem to qualify
for a TAG review. FYI We have filed one for Web Bluetooth
"exclusionFilters" option recently which was marked as
satisfied at
https://github.com/w3ctag/design-reviews/issues/830
<https://github.com/w3ctag/design-reviews/issues/830>
*
TAG review status
*
Not Applicable
*
Risks
*
*
Interoperability and Compatibility
*
Older browsers will ignore exclusionFilters and all devices
matching the provided filter will be displayed (the current
behavior).
Signals from other implementations (Gecko, WebKit):
Gecko: No Signal [1]
WebKit: No Signal [1]
Web / Framework developers: Positive
https://github.com/WICG/webusb/issues/232
<https://github.com/WICG/webusb/issues/232>
[1] Both Gecko and WebKit are unlikely to object to this
feature specifically, but object to the overall WebUSB API as
a whole, hence it doesn't make sense to bug them with specific
questions on this.
Activation:
This feature can't be polyfilled. It should be fairly trivial
for developers to adopt this new feature.
*
Debuggability
*
No specific DevTools changes are required. This feature is
treated like any other JS method.
Note that exposing DevTools debugging support for
device-access APIs (WebUSB included) is discussed at
https://bugs.chromium.org/p/chromium/issues/detail?id=1142566#c20
<https://bugs.chromium.org/p/chromium/issues/detail?id=1142566#c20>.
*
Is this feature fully tested by web-platform-tests
<https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md>?
*
No, because browser picker implementation is implemented
outside of Blink and so isn’t testable fully by
web-platform-tests.
*
Requires code in //chrome?
*
Yes, the browser picker implementation is part of the UI code
in //chrome.
*
Tracking bug
*
https://bugs.chromium.org/p/chromium/issues/detail?id=1455392
<https://bugs.chromium.org/p/chromium/issues/detail?id=1455392>
Estimated milestones
117
*
Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5172269315260416
<https://chromestatus.com/feature/5172269315260416>
--
You received this message because you are subscribed to the Google
Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to blink-dev+unsubscr...@chromium.org.
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPpwU5%2BGr-iskzoo-kUhH2%2BFNJL6-OyG44m6jFW1jZXMw3%3DUHg%40mail.gmail.com
<https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPpwU5%2BGr-iskzoo-kUhH2%2BFNJL6-OyG44m6jFW1jZXMw3%3DUHg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to blink-dev+unsubscr...@chromium.org.
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/38ae19dd-0a89-bf22-9d03-d8021862fe7e%40chromium.org.