Specify some event-related things.
Added the MIDIEvent interface.
Specified that onmidimessage of MIDIInputDevice should be an event handler,
using the MIDIEvent as its event type.
--- a/midi/specification.html Wed May 23 12:23:33 2012 +0300
+++ b/midi/specification.html Wed May 23 13:35:23 2012 +0300
@@ -290,6 +290,45 @@
<section>
<h2><a>MIDIInputDevice</a> Interface</h2>
+
+ <p>
+ Whenever the MIDI device corresponding the
+ <code><a>MIDIInputDevice</a></code> sends a MIDI message, the UA MUST
+ run the following steps:
+ </p>
+
+ <ol>
+ <li>
+ <p>
+ Let <code>device</code> be the <code><a>MIDIInputDevice</a></code>.
+ </p>
+ </li>
+
+ <li>
+ <p>
+ Let <code>messages</code> be a newly constructed
+ <code>sequence<<a>MIDIMessage</a>></code> corresponding the
+ MIDI messages the device sent.
+ </p>
+ </li>
+
+ <li>
+ <p>
+ Let <code>event</code> be a newly constructed
+ <code><a>MIDIEvent</a></code>, with the <code>MIDIMessages</code>
+ attribute set to <code>messages</code>.
+ </p>
+ </li>
+
+ <li>
+ <p>
+ Fire an event named <code><a
+ href="#event-midiinputdevice-midimessage">midimessage</a></code>
+ at the object, using the <code>event</code> as the event object.
+ </p>
+ </li>
+ </ol>
+
<dl title="[NoInterfaceObject]
interface MIDIInputDevice implements EventTarget"
class="idl">
@@ -311,6 +350,12 @@
<dt class="no-docs">[TreatNonCallableAsNull] attribute
Function? onmidimessage</dt>
<dd>
+ <p>
+ This event handler, of type <code><a href=
+ "#event-midiinputdevice-midimessage"></a></code>, MUST be
+ supported by all objects implementing
+ <code><a>MIDIInputDevice</a></code> interface.
+ </p>
</dd>
</dl>
</section>
@@ -384,6 +429,22 @@
</p>
</dd>
</dl>
+
+ <section>
+ <h3><a>MIDIEvent</a> Interface</h3>
+
+ <dl title="[NoInterfaceObject]
+ interface MIDIEvent : Event"
+ class="idl">
+ <dt>readonly attribute sequence<<a>MIDIMessage</a>> MIDIMessages</dt>
+ <dd>
+ <p>
+ A sequence of <code><a>MIDIMessage</a></code>s associated
+ with the event.
+ </p>
+ </dd>
+ </dl>
+ </section>
</section>
</body>
</html>