LGTM1
On 3/24/22 11:51 PM, 'François Beaufort 🇫🇷' via blink-dev wrote:
Contact emails
fbeauf...@google.com <mailto:fbeauf...@google.com>
mattreyno...@google.com <mailto:mattreyno...@google.com>
Explainer
https://github.com/WICG/webhid/blob/main/EXPLAINER.md
<https://github.com/WICG/webhid/blob/main/EXPLAINER.md>
Specification
https://wicg.github.io/webhid/#dom-hiddevicerequestoptions-exclusionfilters
<https://wicg.github.io/webhid/#dom-hiddevicerequestoptions-exclusionfilters>
https://github.com/WICG/webhid/pull/93
<https://github.com/WICG/webhid/pull/93>
Summary
The "exclusionFilters" option in navigator.hid.requestDevice() allows
web developers to exclude some devices from the browser picker. It can
be used to exclude devices that are known to be malfunctioning.
Blink component
Blink>HID
<https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink%3EHID>
Motivation
Allowing web developers, through the "exclusionFilters" option, to
exclude directly from the browser picker some devices that are known
to not function in a way that suits the site will improve user
experience. Without it, web developers let users pick a device, then
have to check against a custom JavaScript helper function (like
deviceIsBlocklisted()) whether device is known to be malfunctioning
and if that’s the case alert users the device they’ve picked is not
suitable, resulting in a poor user experience.
// Request access to a device with vendor ID 0xABCD. The device must
also have a
// collection with usage page Consumer (0x000C) and usage ID Consumer
Control
// (0x0001). The device with product ID 0x1234 has been reported as
malfunctioning.
constdevices = awaitnavigator.hid.requestDevice({
filters: [{ vendorId: 0xabcd, usagePage: 0x000c, usage: 0x0001}],
exclusionFilters: [{ vendorId: 0xabcd, productId: 0x1234}],
});
TAG review
This small addition to the WebHID API doesn’t seem to qualify for a
TAG review. I’m happy to file one if desired though.
TAG review status
Not Applicable
Risks
Interoperability and Compatibility
This small addition to the HIDDeviceRequestOptions dictionary does not
change the overall status of WebHID interoperability or compatibility.
Signals from other implementations (Gecko, WebKit):
Gecko: No Signal [1]
WebKit: No Signal [1]
Web / Framework developers: Positive
https://github.com/WICG/webhid/issues/92
<https://github.com/WICG/webhid/issues/92>
Other signals: Google Meet folks have asked for this addition and
strongly support this.
[1] Both Gecko and WebKit are unlikely to object to this feature
specifically, but object to the overall WebHID 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
(WebHID included) is discussed at
https://bugs.chromium.org/p/chromium/issues/detail?id=1142566
<https://bugs.chromium.org/p/chromium/issues/detail?id=1142566>.
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 by web-platform-tests.
Manual tests should be possible, right?
Requires code in //chrome?
Yes, browser picker implementation lives in //chrome.
Tracking bug
https://bugs.chromium.org/p/chromium/issues/detail?id=1301934
<https://bugs.chromium.org/p/chromium/issues/detail?id=1301934>
Estimated milestones
102
Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5194022623641600
<https://chromestatus.com/feature/5194022623641600>
--
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/CAPpwU5JYJCYBgmg9Kr6G%2Bt7yH5iU_X_3QJhO-_8rk%3DjYW%2BLsYQ%40mail.gmail.com
<https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPpwU5JYJCYBgmg9Kr6G%2Bt7yH5iU_X_3QJhO-_8rk%3DjYW%2BLsYQ%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/e4daadc6-5574-32a5-ba00-1104578fbf46%40chromium.org.