web api instance property
HIDInputReportEvent: device property
Secure contextLimited availabilityAvailable in workers
The device property of the HIDInputReportEvent interface returns the HIDDevice instance that represents the HID interface that sent the input report.
Value
An HIDDevice.
Examples
In the following example device is a HIDDevice instance, representing the device sending the report. The productName of this device is logged to the console.
device.addEventListener("inputreport", (event) => {
const { data, device, reportId } = event;
console.log(device.productName);
});
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.