Back to Content

MIDIPort: name property

files/en-us/web/api/midiport/name/index.md

latest517 B
Original Source

{{securecontext_header}}{{APIRef("Web MIDI API")}}

The name read-only property of the {{domxref("MIDIPort")}} interface returns the system name of the port.

Value

A string containing the system name of the port.

Examples

The following example loops through all input ports and prints the name of each to the console.

js
for (const entry of midiAccess.inputs) {
  const input = entry[1];
  console.log(input.name);
}

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}