blob: 0c357102be75bce5ee7ea82d8d4ab7dc1a1df9b5 (
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
---
title: GlobalEventHandlers.onloadedmetadata
slug: Web/API/GlobalEventHandlers/onloadedmetadata
tags:
- 事件处理器
- 全局事件处理器
- 参考
- 属性
translation_of: Web/API/GlobalEventHandlers/onloadedmetadata
---
<div>{{ ApiRef("HTML DOM") }}</div>
<p>{{domxref("GlobalEventHandlers")}} mixin的<strong><code>onloadedmetadata</code></strong>属性是处理{{event("loadedmetadata")}}事件的{{event("Event_handlers")}}。</p>
<p><code>loadedmetadata</code>事件在元数据(metadata)被加载完成后触发。</p>
<h2 id="语法">语法</h2>
<pre class="syntaxbox"><em><var>element</var></em>.onloadedmetadata = <em>handlerFunction</em>;
var <em>handlerFunction</em> = <em><var>element</var></em>.onloadedmetadata;
</pre>
<p><code>handlerFunction</code>应当是<code>null</code>或是由<a href="/en-US/docs/Web/JavaScript/Reference/Functions" title="/en-US/docs/JavaScript/Reference/Functions_and_function_scope">JavaScript函数</a>声明的事件handler。</p>
<h2 id="规范">规范</h2>
<table class="spectable standard-table">
<tbody>
<tr>
<th scope="col">规范</th>
<th scope="col">状态</th>
<th scope="col">备注</th>
</tr>
<tr>
<td>{{SpecName('HTML WHATWG','#handler-onloadedmetadata','onloadedmetadata')}}</td>
<td>{{Spec2('HTML WHATWG')}}</td>
<td></td>
</tr>
</tbody>
</table>
<h2 id="浏览器兼容性">浏览器兼容性</h2>
<div class="hidden">该页面上的兼容性表是由结构化数据生成的。如果您想对数据做出贡献,请查看 <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> ,并向我们发送一个pull request。</div>
<p>{{Compat("api.GlobalEventHandlers.onloadedmetadata")}}</p>
<h2 id="参考">参考</h2>
<ul>
<li>{{event("loadedmetadata")}}</li>
<li><a href="/en-US/docs/Web/Guide/Events/Event_handlers" title="/en-US/docs/Web/Guide/DOM/Events/Event_handlers">DOM事件句柄</a></li>
</ul>
|