More specificity to the MIDI API.
Fixed a broken event definition (MIDIInputDevice#onmidimessage).
Added event definitions for MIDIDevice#ondevicedisconnect and
MIDIDevice#ondeviceconnect, and defined when they should be triggered.
--- a/midi/specification.html Wed May 23 13:40:24 2012 +0300
+++ b/midi/specification.html Wed May 23 15:17:48 2012 +0300
@@ -250,6 +250,39 @@
<section>
<h2><a>MIDIDevice</a> Interface</h2>
+
+ <p>
+ Whenever the MIDI device corresponding the
+ <code><a>MIDIDevice</a></code> is disconnected or becomes unavailable,
+ the UA MUST run the following steps:
+ </p>
+
+ <ol>
+ <li>
+ <p>
+ Fire a simple event named <code><a
+ href="#event-mididevice-devicedisconnect">devicedisconnect</a></code>
+ at the object.
+ </p>
+ </li>
+ </ol>
+
+ <p>
+ Whenever the MIDI device corresponding the
+ <code><a>MIDIDevice</a></code> is connected or reconnected,
+ the UA MUST run the following steps:
+ </p>
+
+ <ol>
+ <li>
+ <p>
+ Fire a simple event named <code><a
+ href="#event-mididevice-deviceconnect">deviceconnect</a></code>
+ at the object.
+ </p>
+ </li>
+ </ol>
+
<div class="idl" title="MIDIInputDevice implements MIDIDevice"></div>
<div class="idl" title="MIDIOutputDevice implements MIDIDevice"></div>
<dl title="[NoInterfaceObject]
@@ -280,10 +313,22 @@
<dt class="no-docs">[TreatNonCallableAsNull] attribute
Function? ondevicedisconnect</dt>
<dd>
+ <p>
+ This event handler, of type <code><a href=
+ "#event-mididevice-devicedisconnect">devicedisconnect</a></code>,
+ MUST be supported by all objects implementing
+ <code><a>MIDIInputDevice</a></code> interface.
+ </p>
</dd>
<dt class="no-docs">[TreatNonCallableAsNull] attribute
Function? ondeviceconnect</dt>
<dd>
+ <p>
+ This event handler, of type <code><a href=
+ "#event-mididevice-deviceconnect">deviceconnect</a></code>,
+ MUST be supported by all objects implementing
+ <code><a>MIDIInputDevice</a></code> interface.
+ </p>
</dd>
</dl>
@@ -351,8 +396,8 @@
<dd>
<p>
This event handler, of type <code><a href=
- "#event-midiinputdevice-midimessage"></a></code>, MUST be
- supported by all objects implementing
+ "#event-midiinputdevice-midimessage">midimessage</a></code>,
+ MUST be supported by all objects implementing
<code><a>MIDIInputDevice</a></code> interface.
</p>
</dd>