MozMobileConnection.ondatachange

  • Revision slug: DOM/MozMobileConnection.ondatachange
  • Revision title: MozMobileConnection.ondatachange
  • Revision id: 371757
  • Created:
  • Creator: Jeremie
  • Is current revision? No
  • Comment

Revision Content

{{ DomRef() }}

{{ non-standard_header() }}

{{ B2GOnlyHeader2('certified') }}

Summary

The ondatachange property specifies an event listener to receive {{event("datachange")}} events. These events occur whenever the {{domxref("MozMobileConnection.data")}} connection object changes values.

Note: {{domxref("MozMobileConnection")}} inherit from the {{domxref("EventTarget")}} interface, so it's also possible to listen for events by using the {{domxref("Element.addEventListener()","addEventListener()")}} method.

Syntax

navigator.mozMobileConnection.ondatachange = funcRef;

Where funcRef is a function to be called when the {{event("datachange")}} event occurs.

Specification

Not part of any specification

See also

  • {{ domxref("MozMobileConnection") }}
  • {{ domxref("EventTarget") }}

Revision Source

<p>{{ DomRef() }}</p>
<p>{{ non-standard_header() }}</p>
<p>{{ B2GOnlyHeader2('certified') }}</p>
<h2 id="Summary" name="Summary">Summary</h2>
<p>The <code>ondatachange</code> property specifies an event listener to receive {{event("datachange")}} events. These events occur whenever the {{domxref("MozMobileConnection.data")}} connection object changes values.</p>
<div class="note">
  <p><strong>Note:</strong> {{domxref("MozMobileConnection")}} inherit from the {{domxref("EventTarget")}} interface, so it's also possible to listen for events by using the {{domxref("Element.addEventListener()","addEventListener()")}} method.</p>
</div>
<h2 id="Syntax" name="Syntax">Syntax</h2>
<pre class="eval">
navigator.mozMobileConnection.ondatachange = <em>funcRef</em>;
</pre>
<p>Where <code><em>funcRef</em></code> is a function to be called when the {{event("datachange")}} event occurs.</p>
<h2 id="Specification" name="Specification">Specification</h2>
<p>Not part of any specification</p>
<h2 id="See_also">See also</h2>
<ul>
  <li>{{ domxref("MozMobileConnection") }}</li>
  <li>{{ domxref("EventTarget") }}</li>
</ul>
Revert to this revision