aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/uievent/view/index.html
blob: 9c476af0b5e3f1dabd27f326f8ca55083a17b3dd (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
---
title: 用户界面项目视图
slug: Web/API/UIEvent/view
tags:
  - API
  - DOM
  - UI
  - 参考
  - 只读
  - 属性
translation_of: Web/API/UIEvent/view
original_slug: Web/API/UIEvent/视图
---
<p>{{APIRef("DOM Events")}}</p>

<p>The <strong><code>UIEvent.view</code></strong> 只读属性返回的生成事件的 {{domxref("document.defaultView")}} (<code>window</code> of the document) 对象。在浏览器中,这是事件所在的 {{ domxref("Window") }} 对象。</p>

<h2 id="语法">语法</h2>

<pre class="syntaxbox">var <em>view</em> = <em>event</em>.view;
</pre>

<ul>
 <li><code>view</code> 是对 <code>AbstractView</code> 对象的引用。</li>
</ul>

<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('DOM3 Events', '#interface-UIEvent', 'UIEvent')}}</td>
   <td>{{Spec2('DOM3 Events')}}</td>
   <td>{{SpecName('DOM2 Events')}}, 将 <code>view</code> 类型从 <code>AbstractView</code> 更改为 <code>WindowProxy</code>.</td>
  </tr>
  <tr>
   <td>{{SpecName('DOM2 Events', '#Events-UIEvent', 'UIEvent')}}</td>
   <td>{{Spec2('DOM2 Events')}}</td>
   <td>最初的定义。</td>
  </tr>
 </tbody>
</table>

<h2 id="浏览器的兼容性">浏览器的兼容性</h2>

<p>{{Compat("api.UIEvent.view")}}</p>