Thunderbird 3 for developers 编辑

This page lists the changes in Thunderbird 3 that are relevant for developers. See Thunderbird 3 for users to see a list of changes relevant to end users.

Activity Manager

The activity manager is a new way of displaying progress on activities that Thunderbird is doing. It is linked into the status bar so that feedback is shown to the user of the activities in progress. Current documentation (reasonably relevant, but may be out of date).

Address book

Updated interfaces

Various interfaces have been added, dropped or reworked. The main aim of these changes has been to reduce the specialisms to particular address book types, and make the interfaces more generic all round. See also examples of their use.

There is now a menupopup binding that will provide you with a list of address books based on a few parameters.

Autocomplete

The old xpfe autocomplete element has now been updated to implement all the attributes and functions of the toolkit autocomplete element. This means that extensions can now use the same attributes as the toolkit autocomplete element and implement the toolkit autocomplete interfaces to generate their own autocomplete mechanisms.

Address book autocomplete

Some of the address book autocomplete functionality has been updated as well. See the examples for how to use the new interfaces.

Content Browsing

Thunderbird 3 has been improved to allow browsing of content within browser elements in the main mail window - alongside the message pane. See the content tabs page for a detailed background. The significant changes for Thunderbird 3 are:

  • The network.protocol-handler.expose.{about,http,https} prefs have been set to true.
    • This means that any <browser> or <iframe> element will now by default navigate any about:/ http:/ or https: link if the content policy allows it. (Previously, clicking a link would open in the default browser).
  • Extensions should implement an onclick handlers for <browser> and <iframe> elements. The content tabs page has some examples.

Cookies

Thunderbird 3 has relaxed the cookie policy. See Cookies In Thunderbird for more information.

Error Reporting Tools

Thunderbird 3 has extra error reporting tools available internally and for use by extensions.

Form fill

The Gecko code to support form fill (known as satchel) has been enabled in Thunderbird 3 builds. This allows fields submitted in forms to be saved and autocompleted later if a user revisits that page. The content tabs in Thunderbird have an example of how to enable form autocomplete on browser elements, there is also this code snippet.

Note: this also enables autocomplete to work for username/password forms where there are multiple passwords to be entered.

JavaScript

Due to various security considerations. Javascript has been disabled completely in message content (the javascript.allow.mailnews preference no longer has any effect). Javascript is enabled for remote content including RSS feeds.

Passwords

Thunderbird 3 has switched to using the toolkit Password Manager.

Thunderbird includes a new message indexing and search system (gloda) that improves search performance, provides sophisticated full-text  search capabilities and categorized search results. "Gloda" is short for the Thunderbird "global database". See the gloda page for an overview of gloda concepts and information about the implementation. See Creating a gloda message query for information about using gloda in extensions. See Gloda examples for some gloda use-cases.

STEEL

STEEL is the Scriptable Thunderbird Easy Extension Library. It is a FUEL-like set of interfaces to facilitate Thunderbird extension development.

Tabbed mail

Thunderbird 3 supports tabs in the main view. Extensions can create new tab types. The current documentation is in tabmail.xml a small example is in specialTabs.js called contentTabType.

Miscellaneous

  • Many interfaces have had various changes since Thunderbird 3. Some of these have been to uplift interfaces to use newer methods of passing parameters, if you think that a function you used to use in Thunderbird 2 is now throwing exceptions, try checking it in mxr. These are some typical replacements that have been performed in uplifting the code:
  • Various flag sets have been converted from c++ only #defines to constants in idl files, making them accessible from Javascript. The changed files include:
  • The id of the popup you add message pane context options changed from messagePaneContext to mailContext. See also Add Option to Context Menu.
  • gContextMenu.isTextSelected was removed from Thunderbird 3 - see bug 463003 for the replacement code.

Video

The <video> element has been enabled from Gecko. As JavaScript is disabled in emails, controls will not show, but can be accessed via the right-click menu. For <video> elements in remote content (e.g. RSS feeds viewed as a web page), the controls will show as normal.

<audio> elements in emails do not work (bug 515082) as the controls require javascript (bug 449358). The media.autoplay.enabled preference has been turned off by default to avoid annoyances.

More resources

Release notes and announcements

The release notes that accompany each beta contain detailed information about the changes included in each beta release.

MozillaZine

There is an article in the MozillaZine knowledge base that summarizes developer-relevant changes and links to the source discussions, specifications and documentation (in Bugzilla, on various blogs and on the Mozilla wiki). See "Thunderbird 3.0 - New Features and

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:72 次

字数:13282

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文