diff options
Diffstat (limited to 'files/zh-cn/web/api/midiconnectionevent/index.html')
-rw-r--r-- | files/zh-cn/web/api/midiconnectionevent/index.html | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/midiconnectionevent/index.html b/files/zh-cn/web/api/midiconnectionevent/index.html new file mode 100644 index 0000000000..20341c86d9 --- /dev/null +++ b/files/zh-cn/web/api/midiconnectionevent/index.html @@ -0,0 +1,56 @@ +--- +title: MIDIConnectionEvent +slug: Web/API/MIDIConnectionEvent +tags: + - API + - Draft + - MIDI + - 接口 +translation_of: Web/API/MIDIConnectionEvent +--- +<p>{{APIRef("Web MIDI API")}}{{SeeCompatTable}}</p> + +<p>The <strong><code>MIDIConnectionEvent</code></strong> interface of the <a href="/en-US/docs/Web/API/Web_MIDI_API">Web MIDI API</a> is the event passed to the {{domxref("MIDIAccess.onstatechange","onstatechange")}} event of the {{domxref("MIDIAccess")}} interface and the {{domxref("MIDIPorts.onstatechange","onstatechange")}} event of the {{domxref("MIDIPorts")}} interface. This occurs any time a new port becomes available, or when a previously available port becomes unavailable. 例如,这个事件无论是在一个 MIDI 设备插入或拔出设备时都会触发。</p> + +<h2 id="构造函数">构造函数</h2> + +<dl> + <dt>{{domxref("MIDIConnectionEvent.MIDIConnectionEvent")}}</dt> + <dd>创建一个新的 <code>MIDIConnectionEvent</code> 对象。</dd> +</dl> + +<h2 id="属性">属性</h2> + +<dl> + <dt>{{domxref("MIDIConnectionEvent.port")}}</dt> + <dd>返回一个 {{domxref("MIDIPort")}} 实例的引用,指明其端口是否已经连接。</dd> +</dl> + +<h2 id="举例">举例</h2> + +<p> </p> + +<h2 id="规范">规范</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">规范</th> + <th scope="col">状态</th> + <th scope="col">备注</th> + </tr> + <tr> + <td>{{SpecName('WebMIDI API','#midiconnectionevent-interface')}}</td> + <td>{{Spec2('WebMIDI API')}}</td> + <td>Initial definition.</td> + </tr> + </tbody> +</table> + +<h2 id="浏览器兼容">浏览器兼容</h2> + +<div> + + +<p>{{Compat("api.MIDIConnectionEvent")}}</p> +</div> |