Converting extensions to Manifest V3
Thunderbird 128 ESR is the first Thunderbird release to officially support Manifest Version 3.
A general introduction to Manifest V3 and the required changes is provided by extensionworkshop.com. Thunderbird’s add-on team made additional changes to its WebExtension APIs, to remove inconsistencies. This page documents these backward incompatible changes from Manifest V2 to Manifest V3.
Additionally, the examples in our sample repository have been converted to Manifest V3, and might give helpful insights.
accounts API
Default value for the
includeSubFoldersparameter of list([includeSubFolders]) has been changed fromtruetofalse.Default value for the
includeSubFoldersparameter of get(accountId, [includeSubFolders]) has been changed fromtruetofalse.Default value for the
includeSubFoldersparameter of getDefault([includeSubFolders]) has been changed fromtruetofalse.The function
accounts.setDefaultIdentityhas been removed, use getDefault(accountId) instead.The
foldersproperty of the MailAccount type has been replaced by therootFolderproperty.The
typeproperty of the MailAccount type useslocalinstead ofnonefor local accounts.
contacts API
Replaced by addressBooks.contacts API.
The ContactNode type no longer has a
ContactPropertiesproperty, but avCardproperty. It is no longer possible to specify individual contact properties.The onUpdated event provides the entire old vCard in its second parameter, instead of individual changed properties.
The
parentIdis no longer a dedicated parameter for query(queryInfo), but an optional property for itsqueryInfoparameter.The function create(parentId, vCard) expects a vCard for its second parameter, instead of individual properties. It also no longer has a dedicated parameter to specify an id, which is now provided via the vCard.
The function update(id, vCard) expects a vCard for its second parameter, instead of individual properties.
mailingLists API
Replaced by addressBooks.mailingLists API.
browserAction API
Replaced by action API
commands API
The built-in
_execute_browser_actioncommand shortcut for thecommandsmanifest entry has been renamed to_execute_action.
compose API
The
idproperty of the ComposeRecipient type has been renamed tonodeId.The
additionalFccFolderproperty of the ComposeDetails type has been replaced by theadditionalFccFolderIdproperty (expecting a MailFolderId).The
overrideDefaultFccFolderproperty of the ComposeDetails type has been replaced by theoverrideDefaultFccFolderIdproperty (expecting a MailFolderId).The
overrideDefaultFccproperty of the ComposeDetails has been removed. An override can now be cleared by settingoverrideDefaultFccFolderIdtonull.
composeScripts API
Replaced by scripting.compose API.
folders API
The
typeproperty of MailFolder has been removed. Use thespecialUseproperty instead.The
favoriteproperty of MailFolderInfo has been removed. It is now available as a property of MailFolder.The
typeproperty of thequeryInfoparameter of query([queryInfo]) has been removed. Use thespecialUseproperty instead.Default value for the
includeSubFoldersparameter of get(folderId, [includeSubFolders]) has been changed fromtruetofalse.create(folderId, childName) no longer accepts a MailFolder or MailAccount for its first parameter, but a MailFolderId. Use
MailAccount.rootFolderto specify the root of an account.rename(folderId, newName) no longer accepts a MailFolder for its first parameter, but a MailFolderId.
move(sourceFolderId, destinationFolderId) no longer accepts a MailFolder or MailAccount for its parameters, but a MailFolderId. Use
MailAccount.rootFolderto specify the root of an account.copy(sourceFolderId, destinationFolderId) no longer accepts a MailFolder or MailAccount for its parameters, but a MailFolderId. Use
MailAccount.rootFolderto specify the root of an account.delete(folderId) no longer accepts a MailFolder for its first parameter, but a MailFolderId.
update(folderId, updateProperties) no longer accepts a MailFolder for its first parameter, but a MailFolderId.
getFolderInfo(folderId) no longer accepts a MailFolder for its first parameter, but a MailFolderId.
getFolderCapabilities(folderId) no longer accepts a MailFolder for its first parameter, but a MailFolderId.
getParentFolders(folderId, [includeSubFolders]) no longer accepts a MailFolder for its first parameter, but a MailFolderId.
getSubFolders(folderId, [includeSubFolders]) no longer accepts a MailFolder for its first parameter, but a MailFolderId.
Default value for the
includeSubFoldersparameter of getSubFolders(folderId, [includeSubFolders]) has been changed fromtruetofalse.markAsRead(folderId) no longer accepts a MailFolder for its first parameter, but a MailFolderId.
mailTabs API
The
mailTabs.getCurrent()function has been removed, use messenger.mailTabs.query({active:true, currentWindow: true}) instead.The
idproperty of MailTab has been replaced by thetabIdproperty.The
viewTypeproperty of MailTab and MailTabProperties has been replaced by thegroupTypeproperty.The
displayedFolderproperty of MailTabProperties has been replaced by thedisplayedFolderIdproperty, and no longer accepts a MailFolder, but a MailFolderId.
messageDisplay API
The
messageDisplay.onMessageDisplayedevent has been removed, use onMessagesDisplayed instead.The onMessagesDisplayed event returns a MessageList instead of an array of MessageHeader.
The
messageDisplay.getDisplayedMessage()function has been removed, use getDisplayedMessages([tabId]) instead.The getDisplayedMessages([tabId]) function returns a MessageList instead of an array of MessageHeader.
messageDisplayScripts API
Replaced by scripting.messageDisplay API.
messages API
The list(folderId) function no longer accepts a MailFolder, but a MailFolderId.
The default value for the
data_formatparameter of getRaw(message, [options]) has been changed fromBinaryStringtoFile.The
queryInfoparameter of query([queryInfo]) no longer supports thefolderproperty, use thefolderIdproperty instead.The
queryInfoparameter of query([queryInfo]) no longer supports theunreadproperty, use thereadproperty instead.The move(messageIds, folderId, [options]) function no longer accepts a MailFolder, but a MailFolderId for its first parameter.
The copy(messageIds, folderId, [options]) function no longer accepts a MailFolder, but a MailFolderId for its first parameter.
The import(file, folderId, [properties]) function no longer accepts a MailFolder, but a MailFolderId for its second parameter.
The
messages.listTags(),messages.createTag()andmessages.updateTag()functions have been replaced by list(), create([key], tag, color, [callback]) and update(key, updateProperties).
spaces API
The
idproperty of thequeryInfoparameter of query([queryInfo]) has been renamed tospaceId.
spacesToolbar API
The
spacesToolbar APIhas been removed, use spaces API instead.
tabs API
The
mailTabproperty of thequeryInfoparameter of query([queryInfo]) has been removed. Use thetypeproperty instead.The
mailTabproperty of MailTab has been removed. Use thetypeproperty instead.The
tabs.executeScriptandtabs.insertCSSfunctions have been removed. Use scripting API, scripting.compose API or scripting.messageDisplay API instead. Note: It is no longer possible to execute a JavaScript string in Manifest V3.