← Back to release summary

HIDDevice forget()

Category
Device
Type
New or changed feature
Status
Enabled by default (Chrome 100)
Intent stage
Shipped

Summary

The HIDDevice forget() method allows web developers to voluntarily revoke a permission to a HIDDevice that was granted by a user.

Motivation

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. We expect similar functionality in Web Bluetooth, WebUSB, and the Serial API to be added.

Standards & signals

Explainers: https://github.com/WICG/webhid/blob/main/EXPLAINER.md

View on chromestatus.com