Changes up to Thunderbird 91 ESR

Thunderbird 81 Beta

messageDisplay API

See the documentation on those functions and events for more information.

Thunderbird 82 Beta

compose API

tabs API

messageDisplayScripts API

  • Content script functions can now operate on a message display “tab” in the same way they do on a content tab in Thunderbird or Firefox. This requires the new messagesModify permission.

    Here are some basic examples. See the MDN documentation for a more in-depth explanation.

    // Where tabId is the id of a message display tab:
    
    browser.tabs.executeScript(tabId, {
      code: `document.body.textContent = "Hey look, the script ran!";`,
    });
    
    browser.tabs.executeScript(tabId, {
      file: "display.js",
    });
    
    browser.tabs.insertCSS(tabId, {
      code: "body { background-color: red; }",
    });
    
    browser.tabs.insertCSS(tabId, {
      file: "display.css",
    });
    
    browser.tabs.removeCSS(tabId, {
      code: "body { background-color: red; }",
    });
    
    browser.tabs.removeCSS(tabId, {
      file: "display.css",
    });
    
  • Scripts can also be registered to run automatically on messages being displayed, using the new messageDisplayScripts API.

    Again, this works just like the contentScripts API:

    let registeredScripts = await browser.messageDisplayScripts.register({
      css: [
        // Any number of code or file objects could be listed here.
        { code: "body { background-color: red; }" },
        { file: "display.css" },
      ],
      js: [
        // Any number of code or file objects could be listed here.
        { code: `document.body.textContent = "Hey look, the script ran!";` },
        { file: "display.js" },
      ],
    });
    

    Added code will run immediately and CSS will be immediately applied to already-open message display tabs or windows, and any new message display tabs or windows.

    The returned value, registeredScripts in this example, is an object with which you can unregister the code/CSS:

    await registeredScripts.unregister();
    

Note

This functionality does not permanently alter messages, only what the user sees when they are displayed.

Thunderbird 83 Beta

compose API

  • ComposeAttachment objects now have a size property with the size of the attachment in bytes.

contacts API

  • The onUpdated event now calls listeners with a second argument, containing details of the changes made. For example:

    {
      "FirstName": {
        "oldValue": "Daniel",
        "newValue": "Danielle"
      },
      "DisplayName": {
        "oldValue": "Daniel Smith",
        "newValue": "Danielle Smith"
      }
    }
    

Thunderbird 84 Beta

compose API

  • The beginNew function now has an optional messageId argument. If messageId is provided, the referenced message is opened to compose as a new message. This works for ordinary messages and templates.

  • Using beginForward function with a forwardInline type and details argument specified has been fixed.

menus API

  • The standard properties available to onShown are now available for messages being composed, if your extension has the compose permission.

tabs API

  • At start-up, tabs.create will now wait for a window to open before attempting to open a tab.

windows API

browserAction API

  • The setLabel(details) and getLabel(details) functions have been added. It is now possible to set a label value different from the title (which is used as tooltip text). The label can be set to an empty string to make the action button not have a label at all. If the toolbar is set to text-mode only (no icons), the action button label uses the title as fallback, in case an empty label has been set.

composeAction API

  • The setLabel(details) and getLabel(details) functions have been added. It is now possible to set a label value different from the title (which is used as tooltip text). The label can be set to an empty string to make the action button not have a label at all. If the toolbar is set to text-mode only (no icons), the action button label uses the title as fallback, in case an empty label has been set.

messageDisplayAction API

  • The setLabel(details) and getLabel(details) functions have been added. It is now possible to set a label value different from the title (which is used as tooltip text). The label can be set to an empty string to make the action button not have a label at all. If the toolbar is set to text-mode only (no icons), the action button label uses the title as fallback, in case an empty label has been set.

Thunderbird 85 Beta

addressBooks API & contacts API

The addressBooks API and contacts API will now return read-only address books. Add-ons that may update contacts and address books should check the readOnly flag of AddressBookNode.

accounts API

compose API

  • The begin* functions now honor body, plainTextBody and isPlaintext as compose format selectors, overriding the default compose format of the used/default identity. The accounts API can be used to get the used/default identity and its default compose format.

messages API

Thunderbird 86 Beta

theme API

  • The theme API was added to Thunderbird (see bug 1684666). It’s more or less the same as the Firefox theme API, but has been extended to better fit the needs of Thunderbird.

    The color key sidebar_highlight_border has been added.

Thunderbird 87 Beta

commands API

  • The commands now supports the internal shortcuts _execute_compose_action and _execute_message_display_action.

Thunderbird 88 Beta

compose API

  • added a type property to ComposeDetails, to distinguish between new, reply, forward and draft

  • added a from property to ComposeDetails, to get/set the actual from address (independent of the used identity)

contacts API

menus API

messages API

Thunderbird 89 Beta

mailTabs API

menus API

  • fixed browser_action ContextType

  • added message_display_action and compose_action ContextType

  • introducing a fieldId property to OnClickData and OnShowData to to support fields part of the Thunderbird UI (currently supported values are composeSubject, composeTo, composeCc, composeBcc, composeReplyTo and composeNewsgroupTo)

Thunderbird 90 Beta

cloudFile API

  • added support for the browser_style manifest property to the cloudFile API

compose API

messages API

Thunderbird 91.0 ESR

accounts API

addressbooks API

cloudFile API

compose API

  • all attachment related functions and events now also require the compose permission

contacts API

folders API

identities API

  • added identities API (including create/delete/update functions and onCreated/onDeleted/onUpdated events)

  • added signature and signatureIsPlainText to MailIdentity

mailingLists API

mailTabs API

  • the MailTab object now includes a viewType property, supporting the values ungrouped, groupedByThread and groupedBySortType

  • the update([tabId], updateProperties) function allows to set the new viewType property

messages API

tabs API

  • added type property to Tab, supporting addressBook, calendar, calendarEvent, calendarTask, chat, content, mail, messageCompose, messageDisplay, special and tasks

  • added type as supported property of the queryInfo parameter of query(queryInfo)

Thunderbird 91.0.2 ESR

browserAction API

  • backported support for the tabstoolbar location, usable in the default_area manifest key

Thunderbird 91.4.1 ESR

cloudFile API

  • backported support for the templateInfo property, which is now returned by the onFileUpload event

messages API