Last active
February 7, 2018 20:08
-
-
Save Gr8Gatsby/deabbaaa40303162d9eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(typeof Windows != 'undefined') { | |
// Create the picker | |
var picker = new Windows.ApplicationModel.Contacts.ContactPicker(); | |
picker.desiredFieldsWithContactFieldType.append(Windows.ApplicationModel.Contacts.ContactFieldType.email); | |
// Open the picker for the user to select a contact | |
picker.pickContactAsync().done(function (contact) { | |
if (contact !== null) { | |
var output = "Selected contact:\n" + contact.displayName; | |
console.log(output); | |
} else { | |
// The picker was dismissed without selecting a contact | |
console.log("No contact was selected"); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Line 12 is missing
.log
afterconsole
console.log("No contact was selected");