Skip to content
Permalink
Browse files

Change ContactInfo to be a dictionary w/ USVStrings

This addresses #5 and #8. The entries in the dictionary can be omitted
(i.e. resolve to "undefined") when the data type hasn't been requested
by the developer, which is nicer than making them nullable.
  • Loading branch information...
beverloo committed Nov 14, 2018
1 parent b541f25 commit ade45e56b6c415ffe5e6c678e1807cee97b4395e
Showing with 5 additions and 5 deletions.
  1. +5 −5 README.md
@@ -36,10 +36,10 @@ selectRecipientsButton.addEventListener('click', async () => {

## Proposed WebIDL
```WebIDL
interface ContactInfo {
readonly attribute FrozenArray<DOMString>? name;
readonly attribute FrozenArray<DOMString>? email;
readonly attribute FrozenArray<DOMString>? tel;
dictionary ContactInfo {
sequence<USVString> name;
sequence<USVString> email;
sequence<USVString> tel;
};
enum ContactProperty { "email", "name", "tel" };
@@ -51,7 +51,7 @@ dictionary ContactsSelectOptions {
[Exposed=Window, SecureContext]
interface ContactsManager {
Promise<FrozenArray<ContactInfo>> select(ContactsSelectOptions options);
Promise<sequence<ContactInfo>> select(ContactsSelectOptions options);
};
[Exposed=Window, SecureContext]

0 comments on commit ade45e5

Please sign in to comment.
You can’t perform that action at this time.