mozContact.email

  • Revision slug: Web/API/mozContact.email
  • Revision title: mozContact.email
  • Revision id: 439531
  • Created:
  • Creator: Jeremie
  • Is current revision? No
  • Comment

Revision Content

{{ domref() }}

{{ non-standard_header() }}

{{ B2GOnlyHeader2('privileged') }}

Summary

The email property is a list of all the possible e-mail for the contact.

Syntax

var mail = instanceOfMozContact.email

Value

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

ContactField

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

type
An Array of strings representing all the possible types for that mean of contact (e.g. "home", "work", etc.).
value
A string representing the value for the mean of contact.
pref
A boolean indicating if this is the prefered mean of contact (true) or not (false)

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>email</code> property is a list of all the possible e-mail for the contact.</p>
<h2 id="Syntax">Syntax</h2>
<pre>
var mail = <em>instanceOfMozContact</em>.email</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("ContactField")}} objects.</p>
<h3 id="ContactField">ContactField</h3>
<p>Those objects are regular JavaScript objects, each representing a mean of contact with the following properties:</p>
<dl>
  <dt>
    <code>type</code></dt>
  <dd>
    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 strings representing all the possible types for that mean of contact (e.g. "home", "work", etc.).</dd>
  <dt>
    <code>value</code></dt>
  <dd>
    A string representing the value for the mean of contact.</dd>
  <dt>
    <code>pref</code></dt>
  <dd>
    A boolean indicating if this is the prefered mean of contact (<code>true</code>) or not (<code>false</code>)</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