dom / latest / hidinputreportevent / reportid.html /

HIDInputReportEvent.reportId

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The reportId property of the HIDInputReportEvent interface returns the one-byte identification prefix for this report, or 0 if the HID interface does not use report IDs.

Value

A one-byte identification prefix.

Examples

In the following example the reportId of an incoming input report is logged to the console.

device.addEventListener("inputreport", event => {
  const { data, device, reportId } = event;
  console.log(reportId);
});

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
reportId
89
89
No
No
75
No
No
No
No
No
No
No

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/HIDInputReportEvent/reportId