async function connectDevice(usbDevice) {
await usbDevice.open();
if (usbDevice.configuration === null) await usbDevice.selectConfiguration(1);
await usbDevice.claimInterface(0);
}USBDevice: configuration property / notebook
USBDevice: configuration property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.