web api instance method
HIDDevice: close() method
Secure contextLimited availabilityAvailable in workers
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
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.