You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Serial and WebHID APIs are defining higher-level interfaces to USB devices implementing the CDC-ACM and HID interface classes as well as vendor-specific interfaces which are exposed through the host operating system's serial and HID APIs.
Due to variations on operating system configuration the drivers which translate between USB and these higher-level APIs may not be present. In this case a developer can implement this driver in JavaScript using the WebUSB API. It would therefore be convenient for developers to specify when requesting permission to access a device that they will accept either the high-level interface (such as SerialPort or HIDDevice) or the low-level interface, USBDevice.
Phrased in terms of the Permissions API using the proposed requestAll() method like this,
However, since a USB device may include multiple interfaces implementing these protocols a better integration could be to add serialPorts and hidDevices attributes to the USBDevice object. These would be populated when the browser detects that there is a high-level driver claiming one of the device's interfaces.
The text was updated successfully, but these errors were encountered:
The Serial and WebHID APIs are defining higher-level interfaces to USB devices implementing the CDC-ACM and HID interface classes as well as vendor-specific interfaces which are exposed through the host operating system's serial and HID APIs.
Due to variations on operating system configuration the drivers which translate between USB and these higher-level APIs may not be present. In this case a developer can implement this driver in JavaScript using the WebUSB API. It would therefore be convenient for developers to specify when requesting permission to access a device that they will accept either the high-level interface (such as
SerialPort
orHIDDevice
) or the low-level interface,USBDevice
.Phrased in terms of the Permissions API using the proposed
requestAll()
method like this,Alternatively the
requestDevice()
method could be extended to optionally return instances ofSerialPort
orHIDDevice
when requested like this,However, since a USB device may include multiple interfaces implementing these protocols a better integration could be to add
serialPorts
andhidDevices
attributes to theUSBDevice
object. These would be populated when the browser detects that there is a high-level driver claiming one of the device's interfaces.The text was updated successfully, but these errors were encountered: