ContactAddress

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

安全なコンテキスト用: この機能は一部またはすべての対応しているブラウザーにおいて、安全なコンテキスト (HTTPS) でのみ利用できます。

Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。

ContactAddress連絡先ピッカー API のインターフェイスで、物理的な住所を表します。 このインターフェイスのインスタンスは、 ContactsManager.getProperties() が返すオブジェクトの address プロパティから取得されます。

郵便物の宛先に関する国際規格の情報を提供する万国郵便連合のウェブサイトの Addressing S42 standard の素材を参照することが有益な場合があります。

インスタンスプロパティ

親である PaymentAddress からプロパティを継承しています

インスタンスメソッド

親である PaymentAddress からメソッドを継承しています

以下の例では、ユーザーに連絡先を選択するよう促し、最初に返された住所をコンソールに表示します。

js
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.
  }
}

仕様書

Specification
Contact Picker API
# contactaddress

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
ContactAddress
Experimental
addressLine
Experimental
city
Experimental
country
Experimental
dependentLocality
Experimental
organization
Experimental
phone
Experimental
postalCode
Experimental
recipient
Experimental
region
Experimental
sortingCode
Experimental
toJSON
Experimental

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
No support
No support
Experimental. Expect behavior to change in the future.
See implementation notes.