partial interface Navigator { Future requestMIDIAccess (optional boolean systemExclusiveSupportRequested = false ); }; interface MIDIAccess : EventTarget { sequence getInputs (); sequence getOutputs (); MIDIInput getInput (MIDIPort or DOMString or short target); MIDIOutput getOutput (MIDIPort or DOMString or short target); attribute EventHandler onconnect; attribute EventHandler ondisconnect; }; enum MIDIPortType { "input", "output" }; interface MIDIPort : EventTarget { readonly attribute DOMString id; readonly attribute DOMString? manufacturer; readonly attribute DOMString? name; readonly attribute MIDIPortType type; readonly attribute DOMString? version; attribute EventHandler ondisconnect; }; interface MIDIInput : MIDIPort { attribute EventHandler onmessage; }; interface MIDIOutput : MIDIPort { void send (sequence data, optional double timestamp); }; interface MIDIMessageEvent : Event { readonly attribute double receivedTime; readonly attribute Uint8Array data; }; interface MIDIConnectionEvent : Event { readonly attribute MIDIPort port; };