third_party/libusb/webport/src/libusb-to-webusb-adaptor.js
/**
 * Appends the specified data to the 'extraData' property of the given LibusbJs
 * object.
 * @param {!Uint8Array} extraDataToAppend
 * @param {!LibusbJsConfigurationDescriptor|!LibusbJsInterfaceDescriptor|!LibusbJsEndpointDescriptor}
 *     libusbJsObject
 */
Appends the specified data to the 'extraData' property of the given LibusbJs
object.
Appends the specified data to the ' extraData ' property of the given LibusbJs object .
function appendExtraData(extraDataToAppend, libusbJsObject) {
  const oldExtraData =
      goog.object.get(libusbJsObject, 'extraData', new ArrayBuffer(0));
  const newData =
      new Uint8Array(oldExtraData.byteLength + extraDataToAppend.byteLength);
  newData.set(new Uint8Array(oldExtraData), 0);
  newData.set(extraDataToAppend, oldExtraData.byteLength);
  libusbJsObject['extraData'] = newData.buffer;
}
function appendExtraData ( extraDataToAppend , libusbJsObject ) { const oldExtraData = goog . object . get ( libusbJsObject , 'extraData' , new ArrayBuffer ( 0 ) ) ; const newData = new Uint8Array ( oldExtraData . byteLength + extraDataToAppend . byteLength ) ; newData . set ( new Uint8Array ( oldExtraData ) , 0 ) ; newData . set ( extraDataToAppend , oldExtraData . byteLength ) ; libusbJsObject [ 'extraData' ] = newData . buffer ; }
Appends the specified data to the 'extraData' property of the given LibusbJs
 object.
Appends the specified data to the ' extraData ' property of the given LibusbJs object .