1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/.
6 * The origin of this IDL file is
7 * https://webaudio.github.io/web-midi-api/
15 enum MIDIPortDeviceState {
20 enum MIDIPortConnectionState {
26 [SecureContext, Pref="dom.webmidi.enabled",
28 interface MIDIPort : EventTarget {
29 readonly attribute DOMString id;
30 readonly attribute DOMString? manufacturer;
31 readonly attribute DOMString? name;
32 readonly attribute DOMString? version;
33 readonly attribute MIDIPortType type;
34 readonly attribute MIDIPortDeviceState state;
35 readonly attribute MIDIPortConnectionState connection;
36 attribute EventHandler onstatechange;
38 Promise<MIDIPort> open();
40 Promise<MIDIPort> close();