USBOutTransferResult
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.
Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.
Note: This feature is available inWeb Workers.
TheUSBOutTransferResult interface of theWebUSB API provides the result from a call to thetransferOut() andcontrolTransferOut() methods of theUSBDevice interface. It represents the result from requesting a transfer of data from the USB host to the USB device.
In this article
Constructor
USBOutTransferResult()ExperimentalCreates a new
USBOutTransferResultobject with the providedstatusandbytesWrittenfields.
Instance properties
USBOutTransferResult.bytesWrittenRead onlyExperimentalReturns the number of bytes from the transfer request that were sent to the device.
USBOutTransferResult.statusRead onlyExperimentalReturns the status of the transfer request, one of:
"ok"- The transfer was successful."stall"- The device indicated an error by generating a stall condition on the endpoint. A stall on a bulk or interrupt endpoint must be cleared by callingclearHalt()beforetransferOut()can be called again.
Specifications
| Specification |
|---|
| WebUSB API> # usbouttransferresult> |