web api constructor
MIDIConnectionEvent: MIDIConnectionEvent() constructor
Secure context
The MIDIConnectionEvent() constructor creates a new MIDIConnectionEvent object. Typically this constructor is not used as events are created when a new port becomes available, and the object is passed to the statechange event.
Syntax
new MIDIConnectionEvent(type)
new MIDIConnectionEvent(type, midiConnectionEventInit)
Parameters
type- : A string with one of
"connect"or"disconnect".
- : A string with one of
midiConnectionEventInitOptional- : A dictionary including the following fields:
port- : The
MIDIPortinstance representing the port that has connected or disconnected.
- : The
bubblesOptional- : A boolean value indicating whether the event bubbles. The default is
false.
- : A boolean value indicating whether the event bubbles. The default is
cancelableOptional- : A boolean value indicating whether the event can be cancelled. The
default is
false.
- : A boolean value indicating whether the event can be cancelled. The
default is
composedOptional- : A boolean value indicating whether the event will trigger listeners
outside of a shadow root (see
composedfor more details). The default isfalse.
- : A boolean value indicating whether the event will trigger listeners
outside of a shadow root (see
- : A dictionary including the following fields:
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.