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 ContactsManager.getProperties()
.
It may be useful to refer to the Universal Postal Union website's Addressing S42 standard materials, which provide information about international standards for postal addresses.
Instance properties
Inherits properties from its parent, PaymentAddress
.
Instance methods
Inherits methods from its parent, PaymentAddress
.
Examples
The following example prompts 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) {
}
}
Specifications
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 |
14.0–22.0This API was exposed but failed upon opening a contact selector. |
addressLine |
No |
No |
No |
No |
No |
No |
84 |
84 |
No |
60 |
No |
14.0–22.0This API was exposed but failed upon opening a contact selector. |
city |
No |
No |
No |
No |
No |
No |
84 |
84 |
No |
60 |
No |
14.0–22.0This API was exposed but failed upon opening a contact selector. |
country |
No |
No |
No |
No |
No |
No |
84 |
84 |
No |
60 |
No |
14.0–22.0This API was exposed but failed upon opening a contact selector. |
dependentLocality |
No |
No |
No |
No |
No |
No |
84 |
84 |
No |
60 |
No |
14.0–22.0This API was exposed but failed upon opening a contact selector. |
organization |
No |
No |
No |
No |
No |
No |
84 |
84 |
No |
60 |
No |
14.0–22.0This API was exposed but failed upon opening a contact selector. |
phone |
No |
No |
No |
No |
No |
No |
84 |
84 |
No |
60 |
No |
14.0–22.0This API was exposed but failed upon opening a contact selector. |
postalCode |
No |
No |
No |
No |
No |
No |
84 |
84 |
No |
60 |
No |
14.0–22.0This API was exposed but failed upon opening a contact selector. |
recipient |
No |
No |
No |
No |
No |
No |
84 |
84 |
No |
60 |
No |
14.0–22.0This API was exposed but failed upon opening a contact selector. |
region |
No |
No |
No |
No |
No |
No |
84 |
84 |
No |
60 |
No |
14.0–22.0This API was exposed but failed upon opening a contact selector. |
sortingCode |
No |
No |
No |
No |
No |
No |
84 |
84 |
No |
60 |
No |
14.0–22.0This API was exposed but failed upon opening a contact selector. |
toJSON |
No |
No |
No |
No |
No |
No |
84 |
84 |
No |
60 |
No |
14.0–22.0This API was exposed but failed upon opening a contact selector. |