From 138f118ee3c66a61bcd6640d8931e777f9cf6921 Mon Sep 17 00:00:00 2001 From: Chris Mills Date: Thu, 26 Sep 2024 11:47:49 +0100 Subject: [PATCH 1/4] WebHID API available in workers --- .../en-us/web/api/hid/connect_event/index.md | 2 +- .../web/api/hid/disconnect_event/index.md | 2 +- files/en-us/web/api/hid/getdevices/index.md | 2 +- files/en-us/web/api/hid/index.md | 2 +- .../en-us/web/api/hid/requestdevice/index.md | 2 +- .../api/hidconnectionevent/device/index.md | 2 +- .../hidconnectionevent/index.md | 2 +- .../en-us/web/api/hidconnectionevent/index.md | 2 +- files/en-us/web/api/hiddevice/close/index.md | 2 +- .../web/api/hiddevice/collections/index.md | 2 +- files/en-us/web/api/hiddevice/forget/index.md | 2 +- files/en-us/web/api/hiddevice/index.md | 2 +- .../api/hiddevice/inputreport_event/index.md | 2 +- files/en-us/web/api/hiddevice/open/index.md | 2 +- files/en-us/web/api/hiddevice/opened/index.md | 2 +- .../web/api/hiddevice/productid/index.md | 2 +- .../web/api/hiddevice/productname/index.md | 2 +- .../hiddevice/receivefeaturereport/index.md | 2 +- .../api/hiddevice/sendfeaturereport/index.md | 2 +- .../web/api/hiddevice/sendreport/index.md | 2 +- .../en-us/web/api/hiddevice/vendorid/index.md | 2 +- .../web/api/hidinputreportevent/data/index.md | 2 +- .../api/hidinputreportevent/device/index.md | 2 +- .../web/api/hidinputreportevent/index.md | 2 +- .../api/hidinputreportevent/reportid/index.md | 2 +- .../index.md | 1 + files/en-us/web/api/webhid_api/index.md | 2 +- .../web/api/workernavigator/hid/index.md | 34 +++++++++++++++++++ files/en-us/web/api/workernavigator/index.md | 2 ++ files/jsondata/GroupData.json | 2 +- 30 files changed, 64 insertions(+), 27 deletions(-) create mode 100644 files/en-us/web/api/workernavigator/hid/index.md diff --git a/files/en-us/web/api/hid/connect_event/index.md b/files/en-us/web/api/hid/connect_event/index.md index 3ff43e8f3cfbc1c..ebb785ae0dba5bb 100644 --- a/files/en-us/web/api/hid/connect_event/index.md +++ b/files/en-us/web/api/hid/connect_event/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HID.connect_event --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`connect`** event of the {{domxref("HID")}} interface fires when the user agent connects to a HID device. diff --git a/files/en-us/web/api/hid/disconnect_event/index.md b/files/en-us/web/api/hid/disconnect_event/index.md index 4bc82b595cf9a91..bc205de3a9c3b21 100644 --- a/files/en-us/web/api/hid/disconnect_event/index.md +++ b/files/en-us/web/api/hid/disconnect_event/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HID.disconnect_event --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`disconnect`** event of the {{domxref("HID")}} interface fires when the user agent disconnects a HID device. diff --git a/files/en-us/web/api/hid/getdevices/index.md b/files/en-us/web/api/hid/getdevices/index.md index adcbe0a01902341..9f331f44d129412 100644 --- a/files/en-us/web/api/hid/getdevices/index.md +++ b/files/en-us/web/api/hid/getdevices/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HID.getDevices --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`getDevices()`** method of the {{domxref("HID")}} interface gets a list of the connected HID devices that the user has previously been granted access to in response to a {{domxref("HID.requestDevice","requestDevice()")}} call. diff --git a/files/en-us/web/api/hid/index.md b/files/en-us/web/api/hid/index.md index 3d7b0b99e5607e9..a429f60f7e0bbf0 100644 --- a/files/en-us/web/api/hid/index.md +++ b/files/en-us/web/api/hid/index.md @@ -7,7 +7,7 @@ status: browser-compat: api.HID --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`HID`** interface provides methods for connecting to _HID devices_, listing attached HID devices and event handlers for connected HID devices. diff --git a/files/en-us/web/api/hid/requestdevice/index.md b/files/en-us/web/api/hid/requestdevice/index.md index bf5deda7805c285..b138515dd5dadf4 100644 --- a/files/en-us/web/api/hid/requestdevice/index.md +++ b/files/en-us/web/api/hid/requestdevice/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HID.requestDevice --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`requestDevice()`** method of the {{domxref("HID")}} interface requests access to a HID device. diff --git a/files/en-us/web/api/hidconnectionevent/device/index.md b/files/en-us/web/api/hidconnectionevent/device/index.md index c6d6f423be110ad..ddf14b812e9982d 100644 --- a/files/en-us/web/api/hidconnectionevent/device/index.md +++ b/files/en-us/web/api/hidconnectionevent/device/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDConnectionEvent.device --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`device`** read-only property of the {{domxref("HIDConnectionEvent")}} interface returns the {{domxref("HIDDevice")}} associated with this connection event. diff --git a/files/en-us/web/api/hidconnectionevent/hidconnectionevent/index.md b/files/en-us/web/api/hidconnectionevent/hidconnectionevent/index.md index 650c06ba34fb4a6..36b67d3ebf02f64 100644 --- a/files/en-us/web/api/hidconnectionevent/hidconnectionevent/index.md +++ b/files/en-us/web/api/hidconnectionevent/hidconnectionevent/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDConnectionEvent.HIDConnectionEvent --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`HIDConnectionEvent()`** constructor creates a new {{domxref("HIDConnectionEvent")}} object. Typically this constructor is not used as events are created when a device's connection state changes. diff --git a/files/en-us/web/api/hidconnectionevent/index.md b/files/en-us/web/api/hidconnectionevent/index.md index 50de8666faf7023..3ea30ada343618a 100644 --- a/files/en-us/web/api/hidconnectionevent/index.md +++ b/files/en-us/web/api/hidconnectionevent/index.md @@ -7,7 +7,7 @@ status: browser-compat: api.HIDConnectionEvent --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`HIDConnectionEvent`** interface of the [WebHID API](/en-US/docs/Web/API/WebHID_API) represents HID connection events, and is the event type passed to {{domxref("HID/connect_event", "connect")}} and {{domxref("HID/disconnect_event", "disconnect")}} event handlers when a device's connection state changes. diff --git a/files/en-us/web/api/hiddevice/close/index.md b/files/en-us/web/api/hiddevice/close/index.md index 220fd7f281f42f6..8a22559093db78a 100644 --- a/files/en-us/web/api/hiddevice/close/index.md +++ b/files/en-us/web/api/hiddevice/close/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDDevice.close --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`close()`** method of the {{domxref("HIDDevice")}} interface closes the connection to the HID device. diff --git a/files/en-us/web/api/hiddevice/collections/index.md b/files/en-us/web/api/hiddevice/collections/index.md index f2a98ef93700166..61409c6000449d5 100644 --- a/files/en-us/web/api/hiddevice/collections/index.md +++ b/files/en-us/web/api/hiddevice/collections/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDDevice.collections --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`collections`** read-only property of the {{domxref("HIDDevice")}} interface returns an array of report formats diff --git a/files/en-us/web/api/hiddevice/forget/index.md b/files/en-us/web/api/hiddevice/forget/index.md index d734c5f97f8c70f..5871c74b92d1691 100644 --- a/files/en-us/web/api/hiddevice/forget/index.md +++ b/files/en-us/web/api/hiddevice/forget/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDDevice.forget --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`forget()`** method of the {{domxref("HIDDevice")}} interface closes the connection to the HID device and forgets the device. diff --git a/files/en-us/web/api/hiddevice/index.md b/files/en-us/web/api/hiddevice/index.md index 7b53c79a04ed333..6eacc7239249b6c 100644 --- a/files/en-us/web/api/hiddevice/index.md +++ b/files/en-us/web/api/hiddevice/index.md @@ -7,7 +7,7 @@ status: browser-compat: api.HIDDevice --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`HIDDevice`** interface of the [WebHID API](/en-US/docs/Web/API/WebHID_API) represents a HID Device. It provides properties for accessing information about the device, methods for opening and closing the connection, and the sending and receiving of reports. diff --git a/files/en-us/web/api/hiddevice/inputreport_event/index.md b/files/en-us/web/api/hiddevice/inputreport_event/index.md index 073d800c8340e05..1fe64f2c68edf06 100644 --- a/files/en-us/web/api/hiddevice/inputreport_event/index.md +++ b/files/en-us/web/api/hiddevice/inputreport_event/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDDevice.inputreport_event --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`inputreport`** event of the {{domxref("HIDDevice")}} interface fires when a new report is received from the HID device. diff --git a/files/en-us/web/api/hiddevice/open/index.md b/files/en-us/web/api/hiddevice/open/index.md index 0ccd3c594c5c45c..afb2dafee6e774b 100644 --- a/files/en-us/web/api/hiddevice/open/index.md +++ b/files/en-us/web/api/hiddevice/open/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDDevice.open --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`open()`** method of the {{domxref("HIDDevice")}} interface requests that the operating system opens the HID device. diff --git a/files/en-us/web/api/hiddevice/opened/index.md b/files/en-us/web/api/hiddevice/opened/index.md index 21d29cb2b7fcdc9..f8d795e3288d00b 100644 --- a/files/en-us/web/api/hiddevice/opened/index.md +++ b/files/en-us/web/api/hiddevice/opened/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDDevice.opened --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`opened`** read-only property of the {{domxref("HIDDevice")}} interface returns true if the connection to the {{domxref("HIDDevice")}} is open and ready to transfer data. diff --git a/files/en-us/web/api/hiddevice/productid/index.md b/files/en-us/web/api/hiddevice/productid/index.md index 87532562d653fde..31698c7e839860b 100644 --- a/files/en-us/web/api/hiddevice/productid/index.md +++ b/files/en-us/web/api/hiddevice/productid/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDDevice.productId --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`productId`** read-only property of the {{domxref("HIDDevice")}} interface returns the product ID of the connected HID device. diff --git a/files/en-us/web/api/hiddevice/productname/index.md b/files/en-us/web/api/hiddevice/productname/index.md index 413db329614e3ff..e750c13fdb3d789 100644 --- a/files/en-us/web/api/hiddevice/productname/index.md +++ b/files/en-us/web/api/hiddevice/productname/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDDevice.productName --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`productName`** read-only property of the {{domxref("HIDDevice")}} interface returns the product name of the connected HID device. diff --git a/files/en-us/web/api/hiddevice/receivefeaturereport/index.md b/files/en-us/web/api/hiddevice/receivefeaturereport/index.md index e513768a4377bbd..7b0f4b72c6b41a1 100644 --- a/files/en-us/web/api/hiddevice/receivefeaturereport/index.md +++ b/files/en-us/web/api/hiddevice/receivefeaturereport/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDDevice.receiveFeatureReport --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`receiveFeatureReport()`** method of the {{domxref("HIDDevice")}} interface receives a feature report from the HID device. Feature reports are a way for HID devices and applications to exchange non-standardized HID data. diff --git a/files/en-us/web/api/hiddevice/sendfeaturereport/index.md b/files/en-us/web/api/hiddevice/sendfeaturereport/index.md index 396f3b24808de59..46eb09d66e183dd 100644 --- a/files/en-us/web/api/hiddevice/sendfeaturereport/index.md +++ b/files/en-us/web/api/hiddevice/sendfeaturereport/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDDevice.sendFeatureReport --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`sendFeatureReport()`** method of the {{domxref("HIDDevice")}} interface sends a feature report to the HID device. Feature reports are a way for HID devices and applications to exchange non-standardized HID data. diff --git a/files/en-us/web/api/hiddevice/sendreport/index.md b/files/en-us/web/api/hiddevice/sendreport/index.md index f6a0fae2d93ec0d..dc0cffc8f2f5134 100644 --- a/files/en-us/web/api/hiddevice/sendreport/index.md +++ b/files/en-us/web/api/hiddevice/sendreport/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDDevice.sendReport --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`sendReport()`** method of the {{domxref("HIDDevice")}} interface sends an output report to the HID device. diff --git a/files/en-us/web/api/hiddevice/vendorid/index.md b/files/en-us/web/api/hiddevice/vendorid/index.md index d24dedbd0f7c3f5..244e53c9014dd26 100644 --- a/files/en-us/web/api/hiddevice/vendorid/index.md +++ b/files/en-us/web/api/hiddevice/vendorid/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDDevice.vendorId --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`vendorId`** read-only property of the {{domxref("HIDDevice")}} interface returns the vendor ID of the connected HID device. This identifies the vendor of the device. diff --git a/files/en-us/web/api/hidinputreportevent/data/index.md b/files/en-us/web/api/hidinputreportevent/data/index.md index 0bd9893a9dbae84..b11496d1d81f849 100644 --- a/files/en-us/web/api/hidinputreportevent/data/index.md +++ b/files/en-us/web/api/hidinputreportevent/data/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDInputReportEvent.data --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`data`** property of the {{domxref("HIDInputReportEvent")}} interface returns a {{jsxref("DataView")}} containing the data from the input report, excluding the `reportId` if the HID interface uses report IDs. diff --git a/files/en-us/web/api/hidinputreportevent/device/index.md b/files/en-us/web/api/hidinputreportevent/device/index.md index ca230aad31f3162..de5f8661ffff922 100644 --- a/files/en-us/web/api/hidinputreportevent/device/index.md +++ b/files/en-us/web/api/hidinputreportevent/device/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDInputReportEvent.device --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`device`** property of the {{domxref("HIDInputReportEvent")}} interface returns the {{domxref("HIDDevice")}} instance that represents the HID interface that sent the input report. diff --git a/files/en-us/web/api/hidinputreportevent/index.md b/files/en-us/web/api/hidinputreportevent/index.md index b02f5d6adf60be2..e8b50d22bca3204 100644 --- a/files/en-us/web/api/hidinputreportevent/index.md +++ b/files/en-us/web/api/hidinputreportevent/index.md @@ -7,7 +7,7 @@ status: browser-compat: api.HIDInputReportEvent --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`HIDInputReportEvent`** interface of the [WebHID API](/en-US/docs/Web/API/WebHID_API) is passed to {{domxref("HIDDevice.inputreport_event", "inputreport")}} event of `HIDDevice` when an input report is received from any associated HID device. diff --git a/files/en-us/web/api/hidinputreportevent/reportid/index.md b/files/en-us/web/api/hidinputreportevent/reportid/index.md index 325d24d87ea340a..defecabe92d0feb 100644 --- a/files/en-us/web/api/hidinputreportevent/reportid/index.md +++ b/files/en-us/web/api/hidinputreportevent/reportid/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDInputReportEvent.reportId --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`reportId`** property of the {{domxref("HIDInputReportEvent")}} interface returns the one-byte identification prefix for this report, or 0 if the HID interface does not use report IDs. diff --git a/files/en-us/web/api/web_workers_api/functions_and_classes_available_to_workers/index.md b/files/en-us/web/api/web_workers_api/functions_and_classes_available_to_workers/index.md index 6f0bda99a158e94..030034d33b3be79 100644 --- a/files/en-us/web/api/web_workers_api/functions_and_classes_available_to_workers/index.md +++ b/files/en-us/web/api/web_workers_api/functions_and_classes_available_to_workers/index.md @@ -79,6 +79,7 @@ The following Web APIs are available to workers: - {{domxref("User-Agent Client Hints API", "", "", "nocode")}} - {{domxref("WebCodecs API", "", "", "nocode")}} - {{domxref("Web Crypto API", "", "", "nocode")}} (e.g. {{domxref("Crypto")}}) +- {{domxref("WebHID API", "", "", "nocode")}} (dedicated and service workers only) - {{domxref("Web Locks API", "", "", "nocode")}} - {{domxref("Web Serial API", "", "", "nocode")}} - {{domxref("Web Periodic Background Synchronization API", "", "", "nocode")}} diff --git a/files/en-us/web/api/webhid_api/index.md b/files/en-us/web/api/webhid_api/index.md index 71046b482af749c..3814d306e1c9f74 100644 --- a/files/en-us/web/api/webhid_api/index.md +++ b/files/en-us/web/api/webhid_api/index.md @@ -7,7 +7,7 @@ status: browser-compat: api.HID --- -{{DefaultAPISidebar("WebHID API")}}{{SeeCompatTable}} +{{DefaultAPISidebar("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} A Human Interface Device (HID) is a type of device that takes input from or provides output to humans. It also refers to the HID protocol, a standard for bi-directional communication between a host and a device that is designed to simplify the installation procedure. The HID protocol was originally developed for USB devices but has since been implemented over many other protocols, including Bluetooth. diff --git a/files/en-us/web/api/workernavigator/hid/index.md b/files/en-us/web/api/workernavigator/hid/index.md new file mode 100644 index 000000000000000..3ff4742a467cb7a --- /dev/null +++ b/files/en-us/web/api/workernavigator/hid/index.md @@ -0,0 +1,34 @@ +--- +title: "WorkerNavigator: hid property" +short-title: hid +slug: Web/API/WorkerNavigator/hid +page-type: web-api-instance-property +status: + - experimental +browser-compat: api.WorkerNavigator.hid +--- + +{{APIRef("WebHID API")}}{{SeeCompatTable}}{{SecureContext_Header}} + +The **`WorkerNavigator.hid`** +read-only property returns an {{domxref("HID")}} object providing methods +for connecting to HID devices, listing attached HID devices, and event +handlers for connected HID devices. + +Where a defined [Permissions Policy](/en-US/docs/Web/HTTP/Permissions_Policy) blocks WebHID usage, the `WorkerNavigator.hid` property will not be available. + +## Value + +An {{domxref("HID")}} object. + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- [WebHID API](/en-US/docs/Web/API/WebHID_API) diff --git a/files/en-us/web/api/workernavigator/index.md b/files/en-us/web/api/workernavigator/index.md index cd765c650427485..ac16ebdf8949b54 100644 --- a/files/en-us/web/api/workernavigator/index.md +++ b/files/en-us/web/api/workernavigator/index.md @@ -29,6 +29,8 @@ _The `WorkerNavigator` interface doesn't inherit any property._ - : Returns the {{domxref("GPU")}} object for the current worker context. The entry point for the {{domxref("WebGPU_API", "WebGPU API", "", "nocode")}}. - {{DOMxRef("WorkerNavigator.hardwareConcurrency")}} {{ReadOnlyInline}} - : Returns the number of logical processor cores available. +- {{domxref("WorkerNavigator.hid")}} {{ReadOnlyInline}} {{Experimental_Inline}} {{SecureContext_Inline}} + - : Returns an {{domxref("HID")}} object providing methods for connecting to HID devices, listing attached HID devices, and event handlers for connected HID devices. - {{DOMxRef("WorkerNavigator.language")}} {{ReadOnlyInline}} - : Returns a string representing the preferred language of the user, usually the language of the browser UI. The `null` value is returned when this is unknown. - {{DOMxRef("WorkerNavigator.languages")}} {{ReadOnlyInline}} diff --git a/files/jsondata/GroupData.json b/files/jsondata/GroupData.json index 3e77f944234732c..cd4b25ae6bb712b 100644 --- a/files/jsondata/GroupData.json +++ b/files/jsondata/GroupData.json @@ -2099,7 +2099,7 @@ "HIDConnectionEvent" ], "methods": [], - "properties": ["Navigator.hid"], + "properties": ["Navigator.hid", "WorkerNavigator.hid"], "events": [] }, "Web Locks API": { From 9c49b354c9780e6155e7d32613a5a29ad2f4c447 Mon Sep 17 00:00:00 2001 From: Chris Mills Date: Tue, 1 Oct 2024 10:40:46 +0100 Subject: [PATCH 2/4] Fixes for beaufortfrancois review comments --- files/en-us/web/api/hid/requestdevice/index.md | 2 +- files/en-us/web/api/workernavigator/hid/index.md | 4 +--- files/en-us/web/api/workernavigator/index.md | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/files/en-us/web/api/hid/requestdevice/index.md b/files/en-us/web/api/hid/requestdevice/index.md index b138515dd5dadf4..bf5deda7805c285 100644 --- a/files/en-us/web/api/hid/requestdevice/index.md +++ b/files/en-us/web/api/hid/requestdevice/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HID.requestDevice --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}} The **`requestDevice()`** method of the {{domxref("HID")}} interface requests access to a HID device. diff --git a/files/en-us/web/api/workernavigator/hid/index.md b/files/en-us/web/api/workernavigator/hid/index.md index 3ff4742a467cb7a..7695138842b460c 100644 --- a/files/en-us/web/api/workernavigator/hid/index.md +++ b/files/en-us/web/api/workernavigator/hid/index.md @@ -11,9 +11,7 @@ browser-compat: api.WorkerNavigator.hid {{APIRef("WebHID API")}}{{SeeCompatTable}}{{SecureContext_Header}} The **`WorkerNavigator.hid`** -read-only property returns an {{domxref("HID")}} object providing methods -for connecting to HID devices, listing attached HID devices, and event -handlers for connected HID devices. +read-only property returns an {{domxref("HID")}} object providing methods for connecting to HID devices already granted permission by the user and listing attached HID devices, and event handlers for responding to HID devices connecting and disconnecting. Where a defined [Permissions Policy](/en-US/docs/Web/HTTP/Permissions_Policy) blocks WebHID usage, the `WorkerNavigator.hid` property will not be available. diff --git a/files/en-us/web/api/workernavigator/index.md b/files/en-us/web/api/workernavigator/index.md index ac16ebdf8949b54..3fece9f0e94cd11 100644 --- a/files/en-us/web/api/workernavigator/index.md +++ b/files/en-us/web/api/workernavigator/index.md @@ -30,7 +30,7 @@ _The `WorkerNavigator` interface doesn't inherit any property._ - {{DOMxRef("WorkerNavigator.hardwareConcurrency")}} {{ReadOnlyInline}} - : Returns the number of logical processor cores available. - {{domxref("WorkerNavigator.hid")}} {{ReadOnlyInline}} {{Experimental_Inline}} {{SecureContext_Inline}} - - : Returns an {{domxref("HID")}} object providing methods for connecting to HID devices, listing attached HID devices, and event handlers for connected HID devices. + - : Returns an {{domxref("HID")}} object providing methods for connecting to HID devices already granted permission by the user and listing attached HID devices, and event handlers for responding to HID devices connecting and disconnecting. - {{DOMxRef("WorkerNavigator.language")}} {{ReadOnlyInline}} - : Returns a string representing the preferred language of the user, usually the language of the browser UI. The `null` value is returned when this is unknown. - {{DOMxRef("WorkerNavigator.languages")}} {{ReadOnlyInline}} From ce143082bfb8051e401f9c81c361132749071eb0 Mon Sep 17 00:00:00 2001 From: Chris Mills Date: Tue, 1 Oct 2024 11:43:54 +0100 Subject: [PATCH 3/4] Update AvailableInWorkers macro calls to use new argument --- files/en-us/web/api/hid/connect_event/index.md | 2 +- files/en-us/web/api/hid/disconnect_event/index.md | 2 +- files/en-us/web/api/hid/getdevices/index.md | 2 +- files/en-us/web/api/hid/index.md | 2 +- files/en-us/web/api/hidconnectionevent/device/index.md | 2 +- .../web/api/hidconnectionevent/hidconnectionevent/index.md | 2 +- files/en-us/web/api/hidconnectionevent/index.md | 2 +- files/en-us/web/api/hiddevice/close/index.md | 2 +- files/en-us/web/api/hiddevice/collections/index.md | 2 +- files/en-us/web/api/hiddevice/forget/index.md | 2 +- files/en-us/web/api/hiddevice/index.md | 2 +- files/en-us/web/api/hiddevice/inputreport_event/index.md | 2 +- files/en-us/web/api/hiddevice/open/index.md | 2 +- files/en-us/web/api/hiddevice/opened/index.md | 2 +- files/en-us/web/api/hiddevice/productid/index.md | 2 +- files/en-us/web/api/hiddevice/productname/index.md | 2 +- files/en-us/web/api/hiddevice/receivefeaturereport/index.md | 2 +- files/en-us/web/api/hiddevice/sendfeaturereport/index.md | 2 +- files/en-us/web/api/hiddevice/sendreport/index.md | 2 +- files/en-us/web/api/hiddevice/vendorid/index.md | 2 +- files/en-us/web/api/hidinputreportevent/data/index.md | 2 +- files/en-us/web/api/hidinputreportevent/device/index.md | 2 +- files/en-us/web/api/hidinputreportevent/index.md | 2 +- files/en-us/web/api/hidinputreportevent/reportid/index.md | 2 +- files/en-us/web/api/webhid_api/index.md | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/files/en-us/web/api/hid/connect_event/index.md b/files/en-us/web/api/hid/connect_event/index.md index ebb785ae0dba5bb..19a70cbab3e2497 100644 --- a/files/en-us/web/api/hid/connect_event/index.md +++ b/files/en-us/web/api/hid/connect_event/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HID.connect_event --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} The **`connect`** event of the {{domxref("HID")}} interface fires when the user agent connects to a HID device. diff --git a/files/en-us/web/api/hid/disconnect_event/index.md b/files/en-us/web/api/hid/disconnect_event/index.md index bc205de3a9c3b21..28ae16defbf47cd 100644 --- a/files/en-us/web/api/hid/disconnect_event/index.md +++ b/files/en-us/web/api/hid/disconnect_event/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HID.disconnect_event --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} The **`disconnect`** event of the {{domxref("HID")}} interface fires when the user agent disconnects a HID device. diff --git a/files/en-us/web/api/hid/getdevices/index.md b/files/en-us/web/api/hid/getdevices/index.md index 9f331f44d129412..e6384e42160c52d 100644 --- a/files/en-us/web/api/hid/getdevices/index.md +++ b/files/en-us/web/api/hid/getdevices/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HID.getDevices --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} The **`getDevices()`** method of the {{domxref("HID")}} interface gets a list of the connected HID devices that the user has previously been granted access to in response to a {{domxref("HID.requestDevice","requestDevice()")}} call. diff --git a/files/en-us/web/api/hid/index.md b/files/en-us/web/api/hid/index.md index a429f60f7e0bbf0..b5802427e4bb543 100644 --- a/files/en-us/web/api/hid/index.md +++ b/files/en-us/web/api/hid/index.md @@ -7,7 +7,7 @@ status: browser-compat: api.HID --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} The **`HID`** interface provides methods for connecting to _HID devices_, listing attached HID devices and event handlers for connected HID devices. diff --git a/files/en-us/web/api/hidconnectionevent/device/index.md b/files/en-us/web/api/hidconnectionevent/device/index.md index ddf14b812e9982d..2bc5054e9a601df 100644 --- a/files/en-us/web/api/hidconnectionevent/device/index.md +++ b/files/en-us/web/api/hidconnectionevent/device/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDConnectionEvent.device --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} The **`device`** read-only property of the {{domxref("HIDConnectionEvent")}} interface returns the {{domxref("HIDDevice")}} associated with this connection event. diff --git a/files/en-us/web/api/hidconnectionevent/hidconnectionevent/index.md b/files/en-us/web/api/hidconnectionevent/hidconnectionevent/index.md index 36b67d3ebf02f64..697815d238e7eca 100644 --- a/files/en-us/web/api/hidconnectionevent/hidconnectionevent/index.md +++ b/files/en-us/web/api/hidconnectionevent/hidconnectionevent/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDConnectionEvent.HIDConnectionEvent --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} The **`HIDConnectionEvent()`** constructor creates a new {{domxref("HIDConnectionEvent")}} object. Typically this constructor is not used as events are created when a device's connection state changes. diff --git a/files/en-us/web/api/hidconnectionevent/index.md b/files/en-us/web/api/hidconnectionevent/index.md index 3ea30ada343618a..f199013a378fdfe 100644 --- a/files/en-us/web/api/hidconnectionevent/index.md +++ b/files/en-us/web/api/hidconnectionevent/index.md @@ -7,7 +7,7 @@ status: browser-compat: api.HIDConnectionEvent --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} The **`HIDConnectionEvent`** interface of the [WebHID API](/en-US/docs/Web/API/WebHID_API) represents HID connection events, and is the event type passed to {{domxref("HID/connect_event", "connect")}} and {{domxref("HID/disconnect_event", "disconnect")}} event handlers when a device's connection state changes. diff --git a/files/en-us/web/api/hiddevice/close/index.md b/files/en-us/web/api/hiddevice/close/index.md index 8a22559093db78a..1743fb073259216 100644 --- a/files/en-us/web/api/hiddevice/close/index.md +++ b/files/en-us/web/api/hiddevice/close/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDDevice.close --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} The **`close()`** method of the {{domxref("HIDDevice")}} interface closes the connection to the HID device. diff --git a/files/en-us/web/api/hiddevice/collections/index.md b/files/en-us/web/api/hiddevice/collections/index.md index 61409c6000449d5..cc0599cdf76a302 100644 --- a/files/en-us/web/api/hiddevice/collections/index.md +++ b/files/en-us/web/api/hiddevice/collections/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDDevice.collections --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} The **`collections`** read-only property of the {{domxref("HIDDevice")}} interface returns an array of report formats diff --git a/files/en-us/web/api/hiddevice/forget/index.md b/files/en-us/web/api/hiddevice/forget/index.md index 5871c74b92d1691..0313522758b77e4 100644 --- a/files/en-us/web/api/hiddevice/forget/index.md +++ b/files/en-us/web/api/hiddevice/forget/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDDevice.forget --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} The **`forget()`** method of the {{domxref("HIDDevice")}} interface closes the connection to the HID device and forgets the device. diff --git a/files/en-us/web/api/hiddevice/index.md b/files/en-us/web/api/hiddevice/index.md index 6eacc7239249b6c..4e3f72cb7689e3c 100644 --- a/files/en-us/web/api/hiddevice/index.md +++ b/files/en-us/web/api/hiddevice/index.md @@ -7,7 +7,7 @@ status: browser-compat: api.HIDDevice --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} The **`HIDDevice`** interface of the [WebHID API](/en-US/docs/Web/API/WebHID_API) represents a HID Device. It provides properties for accessing information about the device, methods for opening and closing the connection, and the sending and receiving of reports. diff --git a/files/en-us/web/api/hiddevice/inputreport_event/index.md b/files/en-us/web/api/hiddevice/inputreport_event/index.md index 1fe64f2c68edf06..261186d19471ee5 100644 --- a/files/en-us/web/api/hiddevice/inputreport_event/index.md +++ b/files/en-us/web/api/hiddevice/inputreport_event/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDDevice.inputreport_event --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} The **`inputreport`** event of the {{domxref("HIDDevice")}} interface fires when a new report is received from the HID device. diff --git a/files/en-us/web/api/hiddevice/open/index.md b/files/en-us/web/api/hiddevice/open/index.md index afb2dafee6e774b..05bf14f03a37e3e 100644 --- a/files/en-us/web/api/hiddevice/open/index.md +++ b/files/en-us/web/api/hiddevice/open/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDDevice.open --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} The **`open()`** method of the {{domxref("HIDDevice")}} interface requests that the operating system opens the HID device. diff --git a/files/en-us/web/api/hiddevice/opened/index.md b/files/en-us/web/api/hiddevice/opened/index.md index f8d795e3288d00b..14ab4545fd4507d 100644 --- a/files/en-us/web/api/hiddevice/opened/index.md +++ b/files/en-us/web/api/hiddevice/opened/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDDevice.opened --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} The **`opened`** read-only property of the {{domxref("HIDDevice")}} interface returns true if the connection to the {{domxref("HIDDevice")}} is open and ready to transfer data. diff --git a/files/en-us/web/api/hiddevice/productid/index.md b/files/en-us/web/api/hiddevice/productid/index.md index 31698c7e839860b..2e4ce3cf6bce603 100644 --- a/files/en-us/web/api/hiddevice/productid/index.md +++ b/files/en-us/web/api/hiddevice/productid/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDDevice.productId --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} The **`productId`** read-only property of the {{domxref("HIDDevice")}} interface returns the product ID of the connected HID device. diff --git a/files/en-us/web/api/hiddevice/productname/index.md b/files/en-us/web/api/hiddevice/productname/index.md index e750c13fdb3d789..88eb9df5ca2002b 100644 --- a/files/en-us/web/api/hiddevice/productname/index.md +++ b/files/en-us/web/api/hiddevice/productname/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDDevice.productName --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} The **`productName`** read-only property of the {{domxref("HIDDevice")}} interface returns the product name of the connected HID device. diff --git a/files/en-us/web/api/hiddevice/receivefeaturereport/index.md b/files/en-us/web/api/hiddevice/receivefeaturereport/index.md index 7b0f4b72c6b41a1..6ef528848f2debe 100644 --- a/files/en-us/web/api/hiddevice/receivefeaturereport/index.md +++ b/files/en-us/web/api/hiddevice/receivefeaturereport/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDDevice.receiveFeatureReport --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} The **`receiveFeatureReport()`** method of the {{domxref("HIDDevice")}} interface receives a feature report from the HID device. Feature reports are a way for HID devices and applications to exchange non-standardized HID data. diff --git a/files/en-us/web/api/hiddevice/sendfeaturereport/index.md b/files/en-us/web/api/hiddevice/sendfeaturereport/index.md index 46eb09d66e183dd..8d6be2202077cbf 100644 --- a/files/en-us/web/api/hiddevice/sendfeaturereport/index.md +++ b/files/en-us/web/api/hiddevice/sendfeaturereport/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDDevice.sendFeatureReport --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} The **`sendFeatureReport()`** method of the {{domxref("HIDDevice")}} interface sends a feature report to the HID device. Feature reports are a way for HID devices and applications to exchange non-standardized HID data. diff --git a/files/en-us/web/api/hiddevice/sendreport/index.md b/files/en-us/web/api/hiddevice/sendreport/index.md index dc0cffc8f2f5134..ca8970f31bd9280 100644 --- a/files/en-us/web/api/hiddevice/sendreport/index.md +++ b/files/en-us/web/api/hiddevice/sendreport/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDDevice.sendReport --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} The **`sendReport()`** method of the {{domxref("HIDDevice")}} interface sends an output report to the HID device. diff --git a/files/en-us/web/api/hiddevice/vendorid/index.md b/files/en-us/web/api/hiddevice/vendorid/index.md index 244e53c9014dd26..eb2ef3e589b541d 100644 --- a/files/en-us/web/api/hiddevice/vendorid/index.md +++ b/files/en-us/web/api/hiddevice/vendorid/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDDevice.vendorId --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} The **`vendorId`** read-only property of the {{domxref("HIDDevice")}} interface returns the vendor ID of the connected HID device. This identifies the vendor of the device. diff --git a/files/en-us/web/api/hidinputreportevent/data/index.md b/files/en-us/web/api/hidinputreportevent/data/index.md index b11496d1d81f849..722145e835cd591 100644 --- a/files/en-us/web/api/hidinputreportevent/data/index.md +++ b/files/en-us/web/api/hidinputreportevent/data/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDInputReportEvent.data --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} The **`data`** property of the {{domxref("HIDInputReportEvent")}} interface returns a {{jsxref("DataView")}} containing the data from the input report, excluding the `reportId` if the HID interface uses report IDs. diff --git a/files/en-us/web/api/hidinputreportevent/device/index.md b/files/en-us/web/api/hidinputreportevent/device/index.md index de5f8661ffff922..197eb2cae29cb05 100644 --- a/files/en-us/web/api/hidinputreportevent/device/index.md +++ b/files/en-us/web/api/hidinputreportevent/device/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDInputReportEvent.device --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} The **`device`** property of the {{domxref("HIDInputReportEvent")}} interface returns the {{domxref("HIDDevice")}} instance that represents the HID interface that sent the input report. diff --git a/files/en-us/web/api/hidinputreportevent/index.md b/files/en-us/web/api/hidinputreportevent/index.md index e8b50d22bca3204..4f0c590cae9ac78 100644 --- a/files/en-us/web/api/hidinputreportevent/index.md +++ b/files/en-us/web/api/hidinputreportevent/index.md @@ -7,7 +7,7 @@ status: browser-compat: api.HIDInputReportEvent --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} The **`HIDInputReportEvent`** interface of the [WebHID API](/en-US/docs/Web/API/WebHID_API) is passed to {{domxref("HIDDevice.inputreport_event", "inputreport")}} event of `HIDDevice` when an input report is received from any associated HID device. diff --git a/files/en-us/web/api/hidinputreportevent/reportid/index.md b/files/en-us/web/api/hidinputreportevent/reportid/index.md index defecabe92d0feb..34e627afcd605b4 100644 --- a/files/en-us/web/api/hidinputreportevent/reportid/index.md +++ b/files/en-us/web/api/hidinputreportevent/reportid/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.HIDInputReportEvent.reportId --- -{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} The **`reportId`** property of the {{domxref("HIDInputReportEvent")}} interface returns the one-byte identification prefix for this report, or 0 if the HID interface does not use report IDs. diff --git a/files/en-us/web/api/webhid_api/index.md b/files/en-us/web/api/webhid_api/index.md index 3814d306e1c9f74..87010b7f44f39c0 100644 --- a/files/en-us/web/api/webhid_api/index.md +++ b/files/en-us/web/api/webhid_api/index.md @@ -7,7 +7,7 @@ status: browser-compat: api.HID --- -{{DefaultAPISidebar("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers}} +{{DefaultAPISidebar("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} A Human Interface Device (HID) is a type of device that takes input from or provides output to humans. It also refers to the HID protocol, a standard for bi-directional communication between a host and a device that is designed to simplify the installation procedure. The HID protocol was originally developed for USB devices but has since been implemented over many other protocols, including Bluetooth. From e3a94af2c1b5b8b37cbc2e6641cef259b2bbdafc Mon Sep 17 00:00:00 2001 From: Chris Mills Date: Wed, 2 Oct 2024 09:22:30 +0100 Subject: [PATCH 4/4] Tweak wording based on wbamberg feedback --- files/en-us/web/api/hid/getdevices/index.md | 2 +- files/en-us/web/api/hid/index.md | 2 +- files/en-us/web/api/navigator/hid/index.md | 4 +--- files/en-us/web/api/workernavigator/hid/index.md | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/files/en-us/web/api/hid/getdevices/index.md b/files/en-us/web/api/hid/getdevices/index.md index e6384e42160c52d..02bad698d4f1671 100644 --- a/files/en-us/web/api/hid/getdevices/index.md +++ b/files/en-us/web/api/hid/getdevices/index.md @@ -10,7 +10,7 @@ browser-compat: api.HID.getDevices {{securecontext_header}}{{APIRef("WebHID API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_worker_except_shared")}} -The **`getDevices()`** method of the {{domxref("HID")}} interface gets a list of the connected HID devices that the user has previously been granted access to in response to a {{domxref("HID.requestDevice","requestDevice()")}} call. +The **`getDevices()`** method of the {{domxref("HID")}} interface gets a list of connected HID devices that the user has previously been granted access to in response to a {{domxref("HID.requestDevice","requestDevice()")}} call. ## Syntax diff --git a/files/en-us/web/api/hid/index.md b/files/en-us/web/api/hid/index.md index b5802427e4bb543..d46cd42bfd5141d 100644 --- a/files/en-us/web/api/hid/index.md +++ b/files/en-us/web/api/hid/index.md @@ -22,7 +22,7 @@ _This interface also inherits properties of its parent, {{domxref("EventTarget") _This interface also inherits methods of its parent, {{domxref("EventTarget")}}._ - {{domxref("HID.getDevices","getDevices()")}} {{Experimental_Inline}} - - : Returns a {{jsxref("Promise")}} that resolves with an array of connected {{domxref("HIDDevice")}} objects. + - : Returns a {{jsxref("Promise")}} that resolves with an array of connected HID devices that the user has previously been granted access to in response to a {{domxref("HID.requestDevice","requestDevice()")}} call. - {{domxref("HID.requestDevice","requestDevice()")}} {{Experimental_Inline}} - : Returns a {{jsxref("Promise")}} that resolves with an array of connected {{domxref("HIDDevice")}} objects. Calling this function will trigger the user agent's permission flow in order to gain permission to access one selected device from the returned list of devices. diff --git a/files/en-us/web/api/navigator/hid/index.md b/files/en-us/web/api/navigator/hid/index.md index 5c7e4281db4d4c8..d216c37cdbb00ae 100644 --- a/files/en-us/web/api/navigator/hid/index.md +++ b/files/en-us/web/api/navigator/hid/index.md @@ -11,9 +11,7 @@ browser-compat: api.Navigator.hid {{APIRef("WebHID API")}}{{SeeCompatTable}}{{SecureContext_Header}} The **`Navigator.hid`** -read-only property returns an {{domxref("HID")}} object providing methods -for connecting to HID devices, listing attached HID devices, and event -handlers for connected HID devices. +read-only property returns an {{domxref("HID")}} object providing methods for accessing HID device connections and events that fire when the user agent connects to or disconnects from a device. Where a defined [Permissions Policy](/en-US/docs/Web/HTTP/Permissions_Policy) blocks WebHID usage, the `Navigator.hid` property will not be available. diff --git a/files/en-us/web/api/workernavigator/hid/index.md b/files/en-us/web/api/workernavigator/hid/index.md index 7695138842b460c..7ddc683fbb3565f 100644 --- a/files/en-us/web/api/workernavigator/hid/index.md +++ b/files/en-us/web/api/workernavigator/hid/index.md @@ -11,7 +11,7 @@ browser-compat: api.WorkerNavigator.hid {{APIRef("WebHID API")}}{{SeeCompatTable}}{{SecureContext_Header}} The **`WorkerNavigator.hid`** -read-only property returns an {{domxref("HID")}} object providing methods for connecting to HID devices already granted permission by the user and listing attached HID devices, and event handlers for responding to HID devices connecting and disconnecting. +read-only property returns an {{domxref("HID")}} object providing methods for accessing HID device connections and events that fire when the user agent connects to or disconnects from a device. Where a defined [Permissions Policy](/en-US/docs/Web/HTTP/Permissions_Policy) blocks WebHID usage, the `WorkerNavigator.hid` property will not be available.