Back to Content

USBDevice: close() method

files/en-us/web/api/usbdevice/close/index.md

latest455 B
Original Source

{{APIRef("WebUSB API")}}{{SeeCompatTable}}{{SecureContext_Header}}{{AvailableInWorkers}}

The close() method of the {{domxref("USBDevice")}} interface returns a {{jsxref("promise")}} that resolves when all open interfaces are released and the device session has ended.

Syntax

js-nolint
close()

Parameters

None.

Return value

A {{jsxref("promise")}}.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}