Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. HID

HID

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.

Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.

Note: This feature is available inWeb Workers, except forShared Web Workers.

TheHID interface provides methods for connecting toHID devices, listing attached HID devices and event handlers for connected HID devices.

EventTarget HID

Instance properties

This interface also inherits properties of its parent,EventTarget.

Instance methods

This interface also inherits methods of its parent,EventTarget.

getDevices()Experimental

Returns aPromise that resolves with an array of connected HID devices that the user has previously been granted access to in response to arequestDevice() call.

requestDevice()Experimental

Returns aPromise that resolves with an array of connectedHIDDevice 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.

Events

connectExperimental

Fired when an HID device is connected.

disconnectExperimental

Fired when an HID device is disconnected.

Specifications

Specification
WebHID API
# dom-hid

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp