More naming changes to Web MIDI API
authorJussi Kalliokoski <jussi.kalliokoski@gmail.com>
Sun, 12 Aug 2012 17:58:04 +0300
changeset 113 8a31db30feb2
parent 112 df28ddef0c73
child 114 6e7e48ed2d82
More naming changes to Web MIDI API

MIDIPort:
* ondeviceconnect -> onconnect
* ondevicedisconnect -> ondisconnect

* deviceName -> name
* deviceManufacturer -> manufacturer
* deviceVersion -> version
* deviceFingerprint -> fingerprint

MIDIInput:
* onmidimessage -> onmessage
midi/specification.html
--- a/midi/specification.html	Sun Aug 12 17:43:35 2012 +0300
+++ b/midi/specification.html	Sun Aug 12 17:58:04 2012 +0300
@@ -346,7 +346,7 @@
               <code><a>MIDIPort</a></code> argument.
               If the <var>target</var> is a DOMString,
               <var>target</var> will be a <code><a>MIDIPort</a></code>
-              whose <code>deviceFingerprint</code> matches the supplied
+              whose <code>fingerprint</code> matches the supplied
               DOMString.
             </li>
 
@@ -397,7 +397,7 @@
               <code><a>MIDIPort</a></code> argument.
               If the <var>target</var> is a DOMString,
               <var>target</var> will be a <code><a>MIDIPort</a></code>
-              whose <code>deviceFingerprint</code> matches the supplied
+              whose <code>fingerprint</code> matches the supplied
               DOMString.
             </li>
 
@@ -494,7 +494,7 @@
     <section>
       <h2><a>MIDIPort</a> Interface</h2>
 
-      <p id="event-mididevice-devicedisconnect">
+      <p id="event-midiport-disconnect">
         Whenever the MIDI device corresponding the
         <code><a>MIDIPort</a></code> is disconnected or becomes unavailable,
         the UA SHOULD run the following steps:
@@ -504,13 +504,13 @@
         <li>
           <p>
             Fire a simple event named <code><a
-            href="#event-mididevice-devicedisconnect">devicedisconnect</a></code>
+            href="#event-midiport-disconnect">disconnect</a></code>
             at the object.
           </p>
         </li>
       </ol>
 
-      <p id="event-mididevice-deviceconnect">
+      <p id="event-midiport-connect">
         Whenever the MIDI device corresponding the
         <code><a>MIDIPort</a></code> is connected or reconnected,
         the UA MUST run the following steps:
@@ -520,7 +520,7 @@
         <li>
           <p>
             Fire a simple event named <code><a
-            href="#event-mididevice-deviceconnect">deviceconnect</a></code>
+            href="#event-midiport-connect">connect</a></code>
             at the object.
           </p>
         </li>
@@ -553,44 +553,44 @@
             this MUST be <code>"input"</code>.
           </p>
         </dd>
-        <dt>readonly attribute DOMString deviceName</dt>
+        <dt>readonly attribute DOMString name</dt>
         <dd>
           <p>The system name of the device.</p>
         </dd>
-        <dt>readonly attribute DOMString deviceManufacturer</dt>
+        <dt>readonly attribute DOMString manufacturer</dt>
         <dd>
           <p>The manufacturer of the device.</p>
         </dd>
-        <dt>readonly attribute DOMString deviceVersion</dt>
+        <dt>readonly attribute DOMString version</dt>
         <dd>
           <p>The version of the device.</p>
         </dd>
-        <dt>readonly attribute DOMString deviceFingerprint</dt>
+        <dt>readonly attribute DOMString fingerprint</dt>
         <dd>
           <p>
             A unique ID of the device. This can be used by developers to
             remember devices the user has chosen for different applications.
             The User Agent SHOULD make sure the
-            <code><a>deviceFingerprint</a></code>
+            <code><a>fingerprint</a></code>
             is unique to only that device if possible.
           </p>
         </dd>
         <dt class="no-docs">[TreatNonCallableAsNull] attribute
-                            Function? ondevicedisconnect</dt>
+                            Function? ondisconnect</dt>
         <dd>
             <p>
               This event handler, of type <code><a href=
-              "#event-mididevice-devicedisconnect">devicedisconnect</a></code>,
+              "#event-midiport-disconnect">disconnect</a></code>,
               SHOULD be supported by all objects implementing the
               <code><a>MIDIPort</a></code> interface.
             </p>
         </dd>
         <dt class="no-docs">[TreatNonCallableAsNull] attribute
-                            Function? ondeviceconnect</dt>
+                            Function? onconnect</dt>
         <dd>
             <p>
               This event handler, of type <code><a href=
-              "#event-mididevice-deviceconnect">deviceconnect</a></code>,
+              "#event-midiport-connect">connect</a></code>,
               SHOULD be supported by all objects implementing the
               <code><a>MIDIPort</a></code> interface.
             </p>
@@ -599,8 +599,8 @@
 
       <div class="note">
         <p>
-          The <code><a>devicedisconnect</a></code> and
-          <code><a>deviceconnect</a></code> events may not be applicable to all
+          The <code><a>disconnect</a></code> and
+          <code><a>connect</a></code> events may not be applicable to all
           MIDI devices or OS APIs. For example, an actual MIDI port does not
           support the notion of disconnect and connect while a USB MIDI Device
           may be plugged in or out on the fly. Therefore the semantics here is
@@ -611,7 +611,7 @@
       <section>
         <h3><a>MIDIInput</a> Interface</h3>
 
-        <p id="event-midiinputdevice-midimessage">
+        <p id="event-midiinput-message">
           Whenever the MIDI device corresponding the
           <code><a>MIDIInput</a></code> sends a MIDI message, the UA MUST
           run the following steps:
@@ -643,7 +643,7 @@
           <li>
             <p>
               Fire an event named <code><a
-              href="#event-midiinputdevice-midimessage">midimessage</a></code>
+              href="#event-midiinput-message">message</a></code>
               at the object, using the <code>event</code> as the event object.
             </p>
           </li>
@@ -653,11 +653,11 @@
                    interface MIDIInput implements EventTarget"
             class="idl">
           <dt class="no-docs">[TreatNonCallableAsNull] attribute
-                              Function? onmidimessage</dt>
+                              Function? onmessage</dt>
           <dd>
             <p>
               This event handler, of type <code><a href=
-              "#event-midiinputdevice-midimessage">midimessage</a></code>,
+              "#event-midiinput-message">message</a></code>,
               MUST be supported by all objects implementing
               <code><a>MIDIInput</a></code> interface.
             </p>