这是indexloc提供的服务,不要输入任何密码
Skip to content

Commit 439c238

Browse files
committed
Fixes #149.
1 parent 51c537d commit 439c238

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -909,13 +909,15 @@ <h3>Requesting Access to the MIDI System with System Exclusive Support</h3>
909909
<h3>Listing Inputs and Outputs</h3>
910910
<p>This example gets the list of the input and output ports and prints their information to the console log, using ES6 for...of notation.
911911
<pre class="code es-code">function listInputsAndOutputs( midiAccess ) {
912-
for (var input in midiAccess.inputs) {
912+
for (var entry of midiAccess.inputs) {
913+
var input = entry[1];
913914
console.log( "Input port [type:'" + input.type + "'] id:'" + input.id +
914915
"' manufacturer:'" + input.manufacturer + "' name:'" + input.name +
915916
"' version:'" + input.version + "'" );
916917
}
917918

918-
for (var output in midiAccess.outputs) {
919+
for (var entry of midiAccess.outputs) {
920+
var output = entry[1];
919921
console.log( "Output port [type:'" + output.type + "'] id:'" + output.id +
920922
"' manufacturer:'" + output.manufacturer + "' name:'" + output.name +
921923
"' version:'" + output.version + "'" );

0 commit comments

Comments
 (0)