diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/midiconnectionevent | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/api/midiconnectionevent')
-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> |