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 Thunderbird 77 Beta for examples.
Registering a compose script in the manifest.json file is not possible at this point.
Transfer sensitive user data (if access has been granted) to a remote server for further processing
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
Details of 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.