deviceproximity

  • Revision slug: DOM/Mozilla_event_reference/deviceproximity
  • Revision title: deviceproximity
  • Revision id: 385941
  • Created:
  • Creator: mattbasta
  • Is current revision? No
  • Comment

Revision Content

The deviceproximity event is fired when fresh data is available from a proximity sensor.

General info

Specification
{{specName('Proximity Events','#event-handlers')}}
Interface
{{domxref("DeviceProximityEvent")}}
Bubbles
No
Cancelable
No
Target
DefaultView (window)
Default Action
None

Properties

{{OpenEventProperties()}}{{SensorCallbackProperties("proximity in centimeters (cm)")}}{{CloseEventProperties()}}

  • {{event("userproximity")}}

See also

  • {{domxref("DeviceProximityEvent")}} Object definition

Revision Source

<p>The <code>deviceproximity</code> event is fired when fresh data is available from a proximity sensor.</p>
<h2 id="General_info">General info</h2>
<dl>
  <dt style="clear: left; float: left; text-align: right; width: 120px;">
    Specification</dt>
  <dd style="margin: 0 0 0 120px;">
    {{specName('Proximity Events','#event-handlers')}}</dd>
  <dt style="clear: left; float: left; text-align: right; width: 120px;">
    Interface</dt>
  <dd style="margin: 0 0 0 120px;">
    {{domxref("DeviceProximityEvent")}}</dd>
  <dt style="clear: left; float: left; text-align: right; width: 120px;">
    Bubbles</dt>
  <dd style="margin: 0 0 0 120px;">
    No</dd>
  <dt style="clear: left; float: left; text-align: right; width: 120px;">
    Cancelable</dt>
  <dd style="margin: 0 0 0 120px;">
    No</dd>
  <dt style="clear: left; float: left; text-align: right; width: 120px;">
    Target</dt>
  <dd style="margin: 0 0 0 120px;">
    DefaultView (<code>window</code>)</dd>
  <dt style="clear: left; float: left; text-align: right; width: 120px;">
    Default Action</dt>
  <dd style="margin: 0 0 0 120px;">
    None</dd>
</dl>
<h2 id="Properties">Properties</h2>
<p>{{OpenEventProperties()}}{{SensorCallbackProperties("proximity in centimeters (cm)")}}{{CloseEventProperties()}}</p>
<h2 id="Related_Events">Related Events</h2>
<ul>
  <li>{{event("userproximity")}}</li>
</ul>
<h2 id="See_also">See also</h2>
<ul>
  <li>{{domxref("DeviceProximityEvent")}} Object definition</li>
</ul>
Revert to this revision