USB.onconnect

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The onconnect property of the USB interface is an event handler called whenever a paired device is connected. It is passed an instance of USBConnectionEvent.

Syntax

USB.onconnect = connectFunction

Specifications

Specification
WebUSB API
# ref-for-dom-usb-onconnect

Browser compatibility

BCD tables only load in the browser