This compose scripts API first appeared in Thunderbird 77. Functionally it is the same as the content scripts API except that it works on the document of email messages during composition. See the MDN documentation for a more in-depth explanation and Changes in Thunderbird 77 for examples.
Registering a compose script through
manifest.json is not possible at this point.
Read and modify your email messages as they are displayed to you
The permission compose is required to use
Register a compose script programmatically
An object that represents a compose script registered programmatically
unregister()Unregister a compose script registered programmatically
The following types are not defined by this API, but by the underlying Mozilla WebExtension code base. They are included here, because there is no other public documentation available.
Specify code, either by pointing to a file or by providing the code directly. Only one of the two is allowed.