ContactAddress

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The ContactAddress interface of the Contact Picker API represents a physical address. Instances of this interface are retrieved from the address property of the objects returned by ContactManager.getProperties().

It may be useful to refer to the Universal Postal Union web site's Addressing S42 standard materials, which provide information about international standards for postal addresses.

Properties

Inherits properties from its parent, PaymentAddress.

Methods

Inherits methods from its parent, PaymentAddress.

Examples

The following example propmpts the user to select contacts, then prints the first returned address to the console.

const props = ['address'];
const opts = {multiple: true};

async function getContacts() {
  try {
      const contacts = await navigator.contacts.select(props, ops);
      const contactAddress = contacts[0].address[0];
      console.log(contactAddress)
  } catch (ex) {
      // Handle any errors here.
  }
}

Specifications

No specification found

No specification data found for api.ContactAddress.
Check for problems with this page or contribute a missing spec_url to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
ContactAddress
No
No
No
No
No
No
84
84
No
60
No
No

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/ContactAddress