WICG / webhid

Web API for accessing Human Interface Devices (HID)
Other
142 stars 35 forks source link

Add HIDDevice.forget() method #84

Closed beaufortfrancois closed 2 years ago

beaufortfrancois commented 3 years ago

This PR is an attempt to add a way for web developers to revoke permission access to a paired HIDDevice. See https://github.com/WICG/webhid/issues/39

// Request a HID device.
const [device] = await navigator.hid.requestDevice({ filters: [] });

// Then later... revoke permission to the HID device.
await device.forget();

@nondebug Please have a look

beaufortfrancois commented 3 years ago

@nondebug Thanks for reviewing! I've addressed some of your feedback in https://github.com/WICG/webhid/pull/84/commits/32bdda857212e1cc03e39a8cd8498c5625e5d3d7.

beaufortfrancois commented 3 years ago

FYI I've started a Chromium CL at https://chromium-review.googlesource.com/c/chromium/src/+/3297868.

beaufortfrancois commented 2 years ago

@nondebug Shall we merge this PR?

beaufortfrancois commented 2 years ago

@nondebug I'm about to commit https://chromium-review.googlesource.com/c/chromium/src/+/3297868. Can you merge this spec PR?