blob: d60261dbfc3794e246be3d5c8eba01c0fc0c4079 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
---
title: GlobalEventHandlers.oncanplaythrough
slug: Web/API/GlobalEventHandlers/oncanplaythrough
translation_of: Web/API/GlobalEventHandlers/oncanplaythrough
---
<div>{{ ApiRef("HTML DOM") }}</div>
<p>全局事件处理器({{domxref("GlobalEventHandlers")}} )之一的 {{event("canplaythrough")}} 属性,是处理当前元素{{event("canplaythrough")}} 事件的事件处理器{{event("Event_handlers")}} .</p>
<p>当用户代理可以播放媒体资源并且可以播放至其结束而不必进一步缓冲内容时,触发<code>canplaythrough</code>事件。</p>
<h2 id="语法">语法</h2>
<pre class="syntaxbox"><em><var>element</var></em>.oncanplaythrough = <em>handlerFunction</em>;
var <em>handlerFunction</em> = <em><var>element</var></em>.oncanplaythrough;
</pre>
<p> </p>
<h2 id="相关链接">相关链接</h2>
<ul>
<li>{{event("canplaythrough")}}</li>
<li><a href="/en-US/docs/Web/Guide/Events/Event_handlers" title="/en-US/docs/Web/Guide/DOM/Events/Event_handlers">DOM event handlers</a></li>
</ul>
|