WebIDLpedia

USB interface

Definition

WebUSB API defines USB



[Exposed=(Worker,Window), SecureContext]
interface USB : EventTarget {
  attribute EventHandler onconnect;
  attribute EventHandler ondisconnect;
  Promise<sequence<USBDevice>> getDevices();
  [Exposed=Window] Promise<USBDevice> requestDevice(USBDeviceRequestOptions options);
};

Methods and attributes that return objects implementing USB

Referring IDL interfaces/dictionaries