
TypeError: browser.addressBooks.quickSearch is not a function
Trying to write an add-on, one of the things it needs to do is scan through the address book looking for a contact with a specified phone number.
The API documentation says I can do this with .quickSearch([parentId], queryInfo)
Here's my code:
/* ---------------- */ let r = browser.addressBooks.quickSearch("5551112222"); console.log(r); /* ---------------- */
Expected output should be a list of contacts matching that string, but instead the console just outputs "uncaught exception: Object"
If I try manually typing:
browser.addressBooks.quickSearch("5551112222")
....into the console, the console's predictive typing analysis pre-fills the output line with:
"TypeError: browser.addressBooks.quickSearch is not a function"
Have I made a mistake in my code somewhere, or is the documentation wrong?
EDIT: I've also tried with:
browser.addressBooks.quickSearch({searchString: '5551112222'})
...but that just produces the same result.
Modified
All Replies (1)
As you have now been advised this is not a support forum for addon development. Please do not post further questions about development issues in this forum.
Addon development support/discussion is managed through topicbox. https://thunderbird.topicbox.com/groups/addons