Interface MIDIPort

Available only in secure contexts.

MDN Reference

interface MIDIPort {
    $destroyListeners?: any[];
    connection: MIDIPortConnectionState;
    id: string;
    manufacturer: string;
    name: string;
    onstatechange: Object;
    state: MIDIPortDeviceState;
    type: MIDIPortType;
    version: string;
    addEventListener<K>(type, listener, options?): void;
    addEventListener(type, listener, options?): void;
    close(): Promise<MIDIPort>;
    dispatchEvent(event): boolean;
    open(): Promise<MIDIPort>;
    removeEventListener<K>(type, listener, options?): void;
    removeEventListener(type, listener, options?): void;
}

Hierarchy

Properties

$destroyListeners?: any[]
id: string
manufacturer: string
name: string
onstatechange: Object
version: string

Methods

  • Type Parameters

    • K extends "statechange"

    Parameters

    Returns void

  • Parameters

    Returns void

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    MDN Reference

    Parameters

    Returns boolean

  • Type Parameters

    • K extends "statechange"

    Parameters

    Returns void

  • Parameters

    Returns void