https://github.com/WICG/webhid/pull/84
The HIDDevice forget() method allows web developers to voluntarily revoke a permission to a HIDDevice that was granted by a user.
Some sites may not be interested in retaining long-term permissions to access a HID device. For example, for an educational web application used on a shared computer with many devices, a large number of accumulated user-generated permissions creates a poor user experience.
In addition to user agent mitigations to avoid this problem, such as defaulting to a session scoped permission on the first request or expiring infrequently used permissions, it should be possible for the site itself to clean up user-generated permissions it is no longer interested in retaining.
// Request a HID device.
const [device] = await navigator.hid.requestDevice({ filters: [] });
// Then later... revoke permission to the HID device.
await device.forget();
We expect similar functionality in Web Bluetooth, WebUSB, and the Serial API to be added.
None yet.
Pending
This small addition to the HIDDevice object 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/39 - Strong positive support from Google Meet.
[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.
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.
No. Some tests that only verify the presence of interfaces and attributes will be available at https://wpt.fyi/results/webhid though.
Yes, permission storage is implemented in //chrome.
https://bugs.chromium.org/p/chromium/issues/detail?id=1279822