async function checkProperties() {
const supportedProperties = await navigator.contacts.getProperties();
if (!supportedProperties.includes("icon")) {
console.log("Your system does not support getting icons.");
}
}ContactsManager: getProperties() method / notebook
ContactsManager: getProperties() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const supportedProperties = await navigator.contacts.getProperties();
async function getContacts() {
try {
const contacts = await navigator.contacts.select(supportedProperties);
handleResults(contacts);
} catch (ex) {
// Handle any errors here.
}
}