The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
Optionaloptions: boolean | AddEventListenerOptionsThe dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
Finds contacts matching the given options.
Optionaloptions: ContactFindOptionsOptions for filtering and sorting the results.
A DOMRequest that returns an array of mozContact objects.
Retrieves all contacts.
Optionaloptions: ContactFindSortOptionsOptions for sorting the results.
A DOMCursor for iterating over the contacts.
Gets the current revision of the contacts database.
A DOMRequest returning the revision number.
Removes a contact.
The contact object or its ID to remove.
A DOMRequest indicating success or failure.
The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.
Optionaloptions: boolean | EventListenerOptionsSaves a contact.
The contact to save.
A DOMRequest indicating success or failure.
Note
NavigatorProperty: "mozContacts"
Note
JSImplementation: "@mozilla.org/contactManager;1"
Note
Permissions: "contacts-read contacts-write contacts-create"