USBDevice: forget() method

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The forget() method of the USBDevice interface returns a Promise that resolves when all pending operations are aborted, all open interfaces are released, the device session has ended, and the permission is reset.

Syntax

js
forget()

Parameters

None.

Return value

A Promise which resolves with undefined once the device access permission is revoked.

Specifications

Specification
WebUSB API
# dom-usbdevice-forget

Browser compatibility

BCD tables only load in the browser