aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/window/onuserproximity/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/api/window/onuserproximity/index.html')
-rw-r--r--files/zh-cn/web/api/window/onuserproximity/index.html45
1 files changed, 45 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/window/onuserproximity/index.html b/files/zh-cn/web/api/window/onuserproximity/index.html
new file mode 100644
index 0000000000..9a4c3a0c7c
--- /dev/null
+++ b/files/zh-cn/web/api/window/onuserproximity/index.html
@@ -0,0 +1,45 @@
+---
+title: Window.onuserproximity
+slug: Web/API/Window/onuserproximity
+translation_of: Web/API/Window/onuserproximity
+---
+<p>{{ ApiRef() }}</p>
+
+<p><strong><code>Window.onuserproxymity</code></strong> 属性代表一个 {{domxref("EventHandler")}}, 当触发 {{event("userproximity")}} 事件时会调用这个函数。这些事件是 {{domxref("UserProximityEvent")}} 类型的,在设备传感器检测到对象变得靠近时触发。</p>
+
+<h2 id="语法">语法</h2>
+
+<pre class="syntaxbox"><em>window</em>.onuserproximity = <em>eventHandler</em></pre>
+
+<h2 id="说明">说明</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">说明</th>
+ <th scope="col">状态</th>
+ <th scope="col">评论</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{ SpecName('Proximity Events', '#user-proximity', 'Proximity Events') }}</td>
+ <td>{{ Spec2('Proximity Events') }}</td>
+ <td>Initial specification</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.Window.onuserproximity")}}</p>
+
+<h2 id="其他">其他</h2>
+
+<ul>
+ <li>{{event("userproximity")}}</li>
+ <li>{{domxref("UserProximityEvent")}}</li>
+ <li><a href="/en-US/docs/WebAPI/Proximity" title="/en-US/docs/WebAPI/Proximity">Proximity Events</a></li>
+</ul>