Skip to content

Commit

Permalink
hid: Add exclusionFilters option to requestDevice
Browse files Browse the repository at this point in the history
This CL adds a exclusionFilters option in navigator.usb.requestDevice()
so that developers can exclude from the browser picker some devices
that are known to not work as expected.
This feature is available behind the WebHIDExclusionFiltersOption blink
runtime feature.

Intent to prototype: TODO
Spec: WICG/webhid#93
Demo: https://hid-exclusion-filters.glitch.me/

Change-Id: If16eb4c788de2acd2454009449699cbbcd6039b8
Bug: 1301934
  • Loading branch information
beaufortfrancois authored and chromium-wpt-export-bot committed Mar 1, 2022
1 parent 8c32957 commit 36818b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/chromium/fake-hid.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,8 @@ class FakeHidService {
}

// Simulates a device chooser prompt, returning |selectedDevices_| as the
// simulated selection. |filters| is ignored.
async requestDevice(filters) {
// simulated selection. |options| is ignored.
async requestDevice(options) {
return {devices: this.selectedDevices_};
}

Expand Down

0 comments on commit 36818b4

Please sign in to comment.