mozContact.adr

  • Revision slug: Web/API/mozContact.adr
  • Revision title: mozContact.adr
  • Revision id: 444017
  • Created:
  • Creator: kscarfone
  • Is current revision? No
  • Comment Editorial review

Revision Content

{{ domref() }}

{{ non-standard_header() }}

{{ B2GOnlyHeader2('privileged') }}

Summary

The adr property is a list of all the possible addresses for the contact.

Syntax

var address = instanceOfMozContact.adr

Value

Return an Array of {{anch("AddressField")}} objects.

AddressField

Those objects are regular JavaScript objects, each representing a means of contact with the following properties:

type
A string representing the type for that address (e.g., "home", "work").
pref
A boolean indicating if it is the preferred address (true) or not (false).
streetAddress
A string representing the street name, number, etc. of the address.
locality
A string representing the city of the address.
region
A string representing the geographical region of the address.
postalCode
A string representing the postal code for the address.
countryName
A string representing the name of the country for the address.

Specifications

Specification Status Comment
{{ SpecName('Contacts', '', 'Contacts Manager API') }} {{ Spec2('Contacts') }} First Working Draft (unstable)
vCard Format Specification RFC RFC6350

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
basic support {{CompatNo()}} {{CompatNo()}} {{CompatNo()}} {{CompatNo()}} {{CompatNo()}}
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
basic support {{CompatNo()}} {{CompatNo()}} 18.0 (non standard) {{CompatNo()}} {{CompatNo()}} {{CompatNo()}}

Gecko Note

As the specification is unstable, the Gecko implementation is completely non-standard.

See also

Revision Source

<p>{{ domref() }}</p>
<p>{{ non-standard_header() }}</p>
<p>{{ B2GOnlyHeader2('privileged') }}</p>
<h2 id="Summary">Summary</h2>
<p>The <code>adr</code> property is a list of all the possible addresses for the contact.</p>
<h2 id="Syntax">Syntax</h2>
<pre>
var address = <em>instanceOfMozContact</em>.adr</pre>
<h2 id="Value">Value</h2>
<p>Return an <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" title="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a> of {{anch("AddressField")}} objects.</p>
<h3 id="AddressField">AddressField</h3>
<p>Those objects are regular JavaScript objects, each representing a means of contact with the following properties:</p>
<dl>
  <dt>
    <code>type</code></dt>
  <dd>
    A string representing the type for that address (e.g., "home", "work").</dd>
  <dt>
    <code>pref</code></dt>
  <dd>
    A boolean indicating if it is the preferred address (<code>true</code>) or not (<code>false</code>).</dd>
  <dt>
    streetAddress</dt>
  <dd>
    A string representing the street name, number, etc. of the address.</dd>
  <dt>
    locality</dt>
  <dd>
    A string representing the city of the address.</dd>
  <dt>
    region</dt>
  <dd>
    A string representing the geographical region of the address.</dd>
  <dt>
    postalCode</dt>
  <dd>
    A string representing the postal code for the address.</dd>
  <dt>
    countryName</dt>
  <dd>
    A string representing the name of the country for the address.</dd>
</dl>
<h2 id="Specifications" name="Specifications">Specifications</h2>
<table class="standard-table">
  <thead>
    <tr>
      <th scope="col">Specification</th>
      <th scope="col">Status</th>
      <th scope="col">Comment</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>{{ SpecName('Contacts', '', 'Contacts Manager API') }}</td>
      <td>{{ Spec2('Contacts') }}</td>
      <td>First Working Draft (unstable)</td>
    </tr>
    <tr>
      <td><a href="http://tools.ietf.org/html/rfc6350" title="http://tools.ietf.org/html/rfc6350">vCard Format Specification</a></td>
      <td>RFC</td>
      <td><code>RFC6350</code></td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari</th>
      </tr>
      <tr>
        <td>basic support</td>
        <td>{{CompatNo()}}</td>
        <td>{{CompatNo()}}</td>
        <td>{{CompatNo()}}</td>
        <td>{{CompatNo()}}</td>
        <td>{{CompatNo()}}</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Android</th>
        <th>Chrome for Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE Mobile</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>basic support</td>
        <td>{{CompatNo()}}</td>
        <td>{{CompatNo()}}</td>
        <td>18.0 (non standard)</td>
        <td>{{CompatNo()}}</td>
        <td>{{CompatNo()}}</td>
        <td>{{CompatNo()}}</td>
      </tr>
    </tbody>
  </table>
</div>
<h3 id="Gecko_Note">Gecko Note</h3>
<p>As the specification is unstable, the Gecko implementation is completely non-standard.</p>
<h2 id="See_also">See also</h2>
<ul>
  <li>{{domxref("mozContact")}}</li>
  <li><a href="/en-US/docs/WebAPI/Contacts" title="/en-US/docs/WebAPI/Contacts">Using the Contact API</a></li>
</ul>
Revert to this revision