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.
Note: This feature is available in Web Workers.
The USBConnectionEvent() constructor creates a new USBConnectionEvent object. This constructor is not typically used, it is created by the browser in response to the connection and disconnection of a USB device.
new USBConnectionEvent(type, options)typeA string with the name of the event. It is case-sensitive and browsers set it to connect or disconnect.
optionsAn object that, in addition of the properties defined in Event(), can have the following properties:
deviceA USBDevice representing the USB device being connected or disconnected.
A new USBConnectionEvent object.