MDN Web Docs

Instance properties

None.

Instance methods

USB.getDevices()

Returns a Promise that resolves with an array of USBDevice objects for paired attached devices.

USB.requestDevice()

Returns a Promise that resolves with an instance of USBDevice if the specified device is found. Calling this function triggers the user agent's pairing flow.

Events

connect

Fired whenever a previously paired device is connected.

disconnect

Fired whenever a paired device is disconnected.

Specifications

Specification
WebUSB API
# usb

Browser compatibility

Help improve MDN

Yes No

Learn how to contribute

This page was last modified on by MDN contributors.

Read the original on developer.mozilla.org ↗