The id read-only property of the MIDIPort interface returns the unique ID of the port.
id
external String get id;