Window.onuserproximity

翻译不完整。 请帮助我们翻译这篇文章!

Window.onuserproxymity 属性代表一个 EventHandler, 当触发 userproximity 事件时会调用这个函数。这些事件是 UserProximityEvent 类型的,在设备传感器检测到对象变得靠近时触发。

语法

window.onuserproximity = eventHandler

说明

说明 状态 评论
Proximity Sensor
Proximity Events
Working Draft Initial specification

浏览器兼容

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
onuserproximity
DeprecatedNon-standard
Chrome No support NoEdge No support NoFirefox Full support YesIE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoFirefox Android No support 15 — 60Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support No

Legend

Full support  
Full support
No support  
No support
Non-standard. Expect poor cross-browser support.
Non-standard. Expect poor cross-browser support.
Deprecated. Not for use in new websites.
Deprecated. Not for use in new websites.

其他