Update for Thunderbird 128

Required steps to update add-ons for Thunderbird Nebula 128.

This section covers the required update steps for add-ons which are already compatible with Thunderbird 115 and need to be made compatible with Thunderbird 128.

Changes in Manifest V2 WebExtension APIs

Our WebExtension APIs are meant to be stable, but we are adding new features and since this is a very young technology this might also require backward incompatible changes. All WebExtension API changes are listed in our WebExtension API documentation:

The known backward incompatible changes are:

Introducing Manifest V3

Thunderbird 128 is the first release to officially support Manifest Version 3. The required changes to convert a Manifest V2 extension to Manifest V3 are listed in our WebExtension API documentation:

Changes in Thunderbird Core

Thunderbird WebExtensions can still run legacy code inside Experiments. Such legacy code has to be adjusted to changes made in Thunderbird Core. All known changes are listed below.

If you have encountered a change which is not yet listed there, please contact us, so we can update the list.

ESMification

The Thunderbird team has finished the conversion of all its JSM files and now only uses ES6 modules instead. There is a compatibility layer, which still maps requests for the old *.jsm files to the new *.sys.mjs files. It is however recommended to use the new files now already. The new files are either loaded via ChromeUtils.importESModule():

const { XPCOMUtils } = ChromeUtils.importESModule("resource://gre/modules/XPCOMUtils.sys.mjs");

or via ChromeUtils.defineESModuleGetters():

ChromeUtils.defineESModuleGetters(this, {
  AttachmentInfo: "resource:///modules/AttachmentInfo.sys.mjs",
  MailUtils: "resource:///modules/MailUtils.sys.mjs",
  PluralForm: "resource:///modules/PluralForm.sys.mjs",
});

nsIMsgCopyServiceListener

Changed in Thunderbird 126 (Bug 1887047).

  • OnProgress() -> onProgress()

  • OnStartCopy() -> onStartCopy()

  • OnStopCopy() -> onStopCopy()

  • GetMessageId() -> getMessageId()

  • SetMessageKey() -> setMessageKey()

thread-pane-columns.mjs

This file has been renamed to ThreadPaneColumns.mjs in Thunderbird 128 (Bug 1890731).

nsIFilePicker::init()

Changed in Thunderbird 125 (Bug 1878401). The type of the first parameter was changed from DOMWindow to BrowsingContext. It will fail when a DOMWindow is passed in. Every DOMWindow has a browsingContext getter:

window.browsingContext

FileUtils.getFile()

The getFile() method has been removed in Thunderbird 116 (Bug 1747467). Use FileUtils.File() instead. Example:

let file = FileUtils.getFile("TmpD", [fileName]);

can be replaced by

let file = new FileUtils.File(PathUtils.join(PathUtils.tempDir, fileName));

MailServices.accounts.FindAccountForServer()

The FindAccountForServer() method has been renamed to findAccountForServer() in Thunderbird 121 (Bug 1865068).

MozElements.NotificationBox.appendNotification()

The implementation of this method has become async in Thunderbird 123. The NotificationBox Experiment has been adjusted accordingly.

Services.jsm

The file Services.jsm and its compatibility layer (added in Thunderbird 115) have been removed, and loading it will now cause an error in Thunderbird 128. It is safe to simply remove all code which was used to load the module in Thunderbird 115 and later.

Services.logins.addLogin()

The addLogin() method has been replaced by the async method Services.logins.addLoginAsync().

XPCOMUtils.defineLazyGetter()

This method has been a thin wrapper for ChromeUtils.defineLazyGetter() since Thunderbird 112 (Bug 1805288). Its usage has been purged from core code and it may stop working anytime.

Last updated