Наши волонтёры ещё не перевели данную статью на Русский. Присоединяйтесь к нам и помогите сделать эту работу!
Вы можете также прочитать эту статью на English (US).

The ondeviceproximity property of the Window interface specifies an EventHandler to receive deviceproximity events. These events occur when the device sensor detects that an object becomes closer to or farther from the device.

Syntax

window.onuserproximity = funcRef

Where funcRef is a function to be called when the deviceproximity event occurs. These events are of type DeviceProximityEvent.

Specifications

Specification Status Comment
Proximity Sensor
The definition of 'Proximity Events' in that specification.
Working Draft Initial specification

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
ondeviceproximityChrome No support NoEdge ? Firefox No support ? — 60IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile ? Firefox Android Full support 15Opera Android No support NoSafari iOS No support NoSamsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown

See also

Метки документа и участники

Внесли вклад в эту страницу: mdnwebdocs-bot, mfluehr, wbamberg, fscholz, teoli, cpigat, MHasan, kscarfone, Sheppy, Jeremie
Обновлялась последний раз: mdnwebdocs-bot,