HIDDevice: productName property
WebHID APIwindowandworkerexceptshared
WebHID APIwindow_and_worker_except_shared
The productName read-only property of the HIDDevice interface returns the product name of the connected HID device.
Value
A string.
Examples
The following example retrieves devices with HID.getDevices() and logs the value of productName to the console.
let devices = await navigator.hid.getDevices();
devices.forEach((device) => {
console.log(`HID: ${device.productName}`);
});