WICG / serial

Serial ports API for the platform.
https://wicg.github.io/serial/
Other
256 stars 48 forks source link

Add SerialPort.forget() method #161

Closed beaufortfrancois closed 2 years ago

beaufortfrancois commented 2 years ago

Following https://github.com/WICG/webhid/pull/84 and https://github.com/WICG/webusb/pull/214, this PR is an attempt to provide a way for web developers to revoke permission access to a paired SerialPort.

// Request a serial port.
const port = await navigator.serial.requestPort();

// Then later... revoke permission to the serial port.
await port.forget();

@reillyeon Please have a look

FIX: #132