This should cover https://www.w3.org/Bugs/Public/show_bug.cgi?id=20125 - last exceptions.
--- a/midi/specification.html Wed Dec 05 12:32:47 2012 -0800
+++ b/midi/specification.html Wed Dec 05 14:00:10 2012 -0800
@@ -611,7 +611,7 @@
<dl title="[NoInterfaceObject]
interface MIDIOutput"
class="idl">
- <dt>void send( Array data, optional DOMHighResTimeStamp? timestamp )</dt>
+ <dt>void send( sequence data, optional DOMHighResTimeStamp? timestamp )</dt>
<dd>
<p>
Enqueues the message to be sent to the corresponding MIDI port. The underlying implementation will (if necessary) coerce each member of the sequence to an unsigned 8-bit integer. The use of sequence rather than a UInt8Array enables developers to use the convenience of <code>output.send( [ 0x90, 0x45, 0x7f ] );</code> rather than having to create a UInt8Array, e.g. <code>output.send( new UInt8Array( [ 0x90, 0x45, 0x7f ] ) );</code> - while still enabling use of UInt8Arrays for efficiency in large MIDI data scenarios (e.g. reading Standard MIDI Files and sending sysex messages).
@@ -619,6 +619,10 @@
<p>
The data must contain any number of valid, complete MIDI messages. Running status is not allowed in the data, as underlying systems may not support it.
</p>
+ <p>
+ If <var>data</var> is not a valid sequence, does not contain a valid MIDI message,
+ or if <code>timestamp</code> is passed but is not a valid DOMHighResTimeStamp, throw a <code>TYPE_ERROR</code> exception.
+ </p>
<dl class='parameters'>
<dt>sequence<short> data</dt>
<dd>