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.

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.

Specification

Specification link


Specification being incubated in a Community Group

Status in Chromium

Blink>HID


Enabled by default (tracking bug)

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

  • No signal
  • No signal
  • Positive

Owners

Last updated on 2022-05-12