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.

Syntax

USB.onconnect = connectFunction

Specifications

Specification Status Comment
WebUSB
The definition of 'onconnect' in that specification.
Draft Initial definition.

Browser compatibility

BCD tables only load in the browser