Skip to content

Commit 2c6c05f

Browse files
committed
Simplify pharsing of event firing
As suggested in DOM spec https://dom.spec.whatwg.org/#firing-events-example this helps with automated extraction of data from specs
1 parent 71df0a7 commit 2c6c05f

File tree

1 file changed

+9
-26
lines changed

1 file changed

+9
-26
lines changed

index.html

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -510,13 +510,9 @@ <h2 id="MIDIAccess">
510510
<li>Let |port:MIDIPort| be the {{MIDIPort}} corresponding to the
511511
newly-available, or the existing port.
512512
</li>
513-
<li>Let |event:MIDIConnectionEvent| be a newly constructed
514-
{{MIDIConnectionEvent}}, with the {{MIDIConnectionEvent/port}}
515-
attribute set to the port.
516-
</li>
517513
<li>
518514
<a>Fire an event</a> named "statechange" at the {{MIDIAccess}},
519-
using the |event| as the event object.
515+
using {{MIDIConnectionEvent}} with {{MIDIConnectionEvent/port}} set to |port|.
520516
</li>
521517
</ol>
522518
</dd>
@@ -904,22 +900,16 @@ <h2 id="MIDIPort">
904900
<ol>
905901
<li>
906902
<p>
907-
Let <code>port</code> be the {{MIDIPort}}.
908-
</p>
909-
</li>
910-
<li>
911-
<p>
912-
Let <code>event</code> be a newly constructed
913-
{{MIDIConnectionEvent}}, with the <code>port</code> attribute set
914-
to the port.
903+
Let |port:MIDIPort| be the {{MIDIPort}}.
915904
</p>
916905
</li>
917906
<li>
918907
<p>
919908
<a>Fire an event</a> named <a data-lt=
920909
"MIDIPort.onstatechange">statechange</a> at the {{MIDIPort}}, and
921910
<a data-lt="MIDIAccess.onstatechange">statechange</a> at the
922-
{{MIDIAccess}}, using the <code>event</code> as the event object.
911+
{{MIDIAccess}}, using {{MIDIConnectionEvent}} with the {{MIDIConnectionEvent/port}} attribute set
912+
to |port|
923913
</p>
924914
</li>
925915
</ol>
@@ -959,7 +949,7 @@ <h3 id="MIDIInput">
959949
<ol>
960950
<li>
961951
<p>
962-
Let <code>port</code> be the {{MIDIInput}}.
952+
Let |port:MIDIInput| be the {{MIDIInput}}.
963953
</p>
964954
</li>
965955
<li>
@@ -971,21 +961,14 @@ <h3 id="MIDIInput">
971961
</li>
972962
<li>
973963
<p>
974-
Let <code>event</code> be a newly constructed
975-
<a>MIDIMessageEvent</a>, with the <code>timestamp</code>
964+
<a>Fire an event</a> named "midimessage" at
965+
|port|, using {{MIDIMessageEvent}} with the {{Event/timeStamp}}
976966
attribute set to the time the message was received by the
977-
system, and with the <code>data</code> attribute set to a
978-
Uint8Array of MIDI data bytes representing a single MIDI
967+
system, and with the {{MIDIMessageEvent/data}} attribute set to a
968+
{{Uint8Array}} of MIDI data bytes representing a single MIDI
979969
message.
980970
</p>
981971
</li>
982-
<li>
983-
<p>
984-
<a>Fire an event</a> named "midimessage" at the
985-
<code>port</code>, using the <code>event</code> as the event
986-
object.
987-
</p>
988-
</li>
989972
</ol>
990973
<p>
991974
It is specifically noted that MIDI System Real-Time Messages may

0 commit comments

Comments
 (0)