MDN self-hosted library · e01.org

HIDDevice: close() method

WebHID APIwindowandworkerexceptshared

WebHID APIwindow_and_worker_except_shared

The close() method of the HIDDevice interface closes the connection to the HID device.

Syntax

close()

Parameters

None.

Return value

A Promise that resolves with undefined once the connection is closed.

Examples

In the following example we close the HID device, once all data has been sent and received.

await device.close();

Specifications

Browser compatibility