This page is not complete.
This content covers features introduced in Thunderbird 5
This page lists the changes in Thunderbird 5 that are relevant for developers. For changes that are relevant to end users, see http://support.mozillamessaging.com/kb/new-thunderbird-5/.
For helpful tips on updating existing extensions for Thunderbird 5, see Updating extensions for Firefox 4. There are several key changes that break compatibility with existing add-ons, so be sure to read that article.
Services.jsmcode module provides getters that make it easy to obtain references to commonly-used services, such as the preferences service or the window mediator, among others.
- The mailServices.js code is similar to Services.jsm but is for mail specific functions.
- JS-ctypes API
- The JS-ctypes API makes it possible to call C-compatible foreign library functions without using XPCOM.
- Add-ons Manager
- The new Add-ons Manager provides information about installed add-ons, support for managing them, and provides ways to install and remove add-ons.
- Loading code modules from chrome: URLs
DownloadLastDir.jsmcode module provides the
gDownloadLastDirglobal variable, which contains a string you can use to learn the path of the directory into which the last download occurred. This module handles issues related to private browsing for you.
Miscellaneous changes to code modules
NetUtil.jsm code module now offers the
readInputStreamToString() method, which lets you read arbitrary bytes from a stream into a string, even if the stream includes zeroes.
MsgHdrToMimeMessage function from
Cu.import("resource:///modules/gloda/mimemsg.js"); now returns a
MimeMessage with enhanced properties. This is the recommended way to easily parse a message into a hierarchical MIME tree, and examine it. Should you find that API to be too restrictive, please do let us know!
MimeMessageAttachmentinstances now sport a
sizeproperty which allows you to conveniently access the size of a message's attachment.
MimeMessageinstances now feature a brand new
allUserAttachmentsproperty which accurately represents the attachments that will be displayed in the message reader. This is probably what you have in mind when you think "attachments". The
allAttachmentsproperty doesn't include MIME parts such as attached emails.
To speed things up, if the message is stored only on the remote IMAP server, you can add an extra
partsOnDemand: truemember to the
optionsobject that you pass to
MsgHdrToMimeMessage, and the backend won't download attachments such as images.
Gloda-indexed messages now feature an additional property called
attachmentInfos, which allows you to quickly manipulate a given message's attachments without having to re-stream it through
attachmentInfos is a list of objects whose properties are
url, size, contentType, name. Please note as of 5a1, there are no plans to bump the database schema, which means only messages indexed after 5 was installed will have this property. You can force gloda to reindex messages that have an
attachmentTypes property, though.
Cu.import("resource:///modules/gloda/index_msg.js") is probably what you need for this.
- When streaming a message through
DisplayMessage, you can now add an extra
&markRead=falseparameter to the URI to prevent the backend from marking a message as read when you display it (on IMAP).
- Thunderbird's tabmail now honors onbeforeunload event handlers. If you're developing something inside a content or a chrome tab, now here's your chance to prevent the tab from being closed.
- Chrome tabs now can have favicons as well.
- When opening a content tab, an extra onload arguments allows you to be notified when the tab is done loading.
- A new "fake header" mechanism has been introduced. Fake headers are inserted after a message has been sent, and serve as placeholder, while autosync fetches the actual header from the remote IMAP server. Their message keys are in the range 2**32 - 128 to 2**32 - 1. They disappear after the real header has come in. This might be surprising for some addons which manipulate message headers, as the message header might become invalid.
In addition to the specific changes referenced below, it's important to note that there are no longer any frozen interfaces. All interfaces are now unfrozen, regardless of what the documentation may say. We'll update the documentation over time.
- Thunderbird has been changed from building statically, to building libxul style.
- Thunderbird now supports the out-of-process plugins facilities that Firefox supports.
- Most of the resources contained within Thunderbird have been combined into a single JAR archive,
omni.jar, which improves startup performance by reducing I/O. For details, read About omni.jar.
- Content tabs now support favicons in the same way that Firefox does.
- Thunderbird releases are now numbered according to the corresponding Gecko release. See the discussion on the tb-planning list for more information.