I have a question regarding the new TB WebExtentions API. I found this
new API very helpful.
Let say for example that we want to problematically create a new
AddressBook / Contact / Mailing List .
the way to do that is:
#####################################################################
let properties = { name: "myNewAddressBookName" };
promise = browser.addressBooks.create(properties).then(() => { });
#####################################################################
that does creates the AddresBook with the name "myNewAddressBookName"
however i found myself in the need to assign the id property of the Node
in this case the AddressBookNode
those properties are described here:
https://thunderbird-webextensions.readthedocs.io/en/latest/addressBooks.html#addressbooks-addressbooknode
If i try to assign the "id" property of the new node of type
"addressBook" then this fails.
here is an example:
#####################################################################
let properties = { name: "myNewAddressBookName" , id: "0d6bb94e-
dbf3-11ea-97b7-036cb8f48e65" };
promise = browser.addressBooks.create(properties).then(() => { });
#####################################################################
with the error thrown:
"
Uncaught Error: Type error for parameter properties (Unexpected property
"id") for addressBooks.create.
"
Is there a way using the new API to assign the Id and the parent of
those nodes programmatically ?
this is really an important question when we are dealing the
applications that requires some sort of synchronization.
many thanks in advanced.
Tito