Changes

Jump to: navigation, search

Thunderbird/Add-ons Guide 63

278 bytes added, 09:38, 31 March 2019
Tweaked section about nsIRequestObserver and nsIStreamListener and whole-sale replaced "tt" with "code" tags.
</source>
The key <ttcode>open_in_tab</ttcode> is optional and defaults to value false. Value true corresponds to <ttcode>optionsType 3</ttcode> in <ttcode>install.rdf</ttcode>.
Examples of extensions converted to this type (as of 3rd December 2018):
== Removed in Thunderbird 60 ==
Overlays have been progressively removed starting from this version. By version 63, there are no overlays left in Thunderbird. Due to Thunderbird's own overlay loader, XUL add-ons can still use overlays, but they can of course not overlay the removed Thunderbird overlays any more. For example, if your add-on overlaid <ttcode>mailWindowOverlay.xul</ttcode>, that needs to be changed; in this example you most likely need to overlay <ttcode>messenger.xul</ttcode> now.
== Removed in Thunderbird 61 ==
* XUL element method <ttcode>.insertItemAt()</ttcode>, replacement: <ttcode>.insertBefore()</ttcode>* XUL element method <ttcode>.removeItemAt()</ttcode>, replacement: <ttcode>.remove()</ttcode>, example: <ttcode>listElement.removeItemAt(i)</ttcode> -> <ttcode>listElement.getItemAtIndex(i).remove()</ttcode>* You can also use <ttcode>.setUnsafeInnerHTML()</ttcode> or <ttcode>document.allowUnsafeHTML = true</ttcode>, as a workaround to the above, see [[Thunderbird/Add-ons_Guide_57#Removed_and_changed_in_mozilla60|here]].* The interface of <ttcode>AddonManager.getAddonByID</ttcode> has changed. It now returns a promise, so instead of calling it as <ttcode>AddonManager.getAddonByID(''addon_id'', ''callback_function'')</ttcode>, you need to call it as <ttcode>AddonManager.getAddonByID(''addon_id'').then(''callback_function')</ttcode>.
== Removed in Thunderbird 63 ==
* XUL elements <ttcode>listbox</ttcode>, <ttcode>listboxitem</ttcode> and <ttcode>listcell</ttcode>. <br/>Replacement: <ttcode>richlistbox</ttcode> ([https://github.com/jobisoft/CategoryManager/commit/2267888be7de0d7ebe4f5b4626c48210c071b16f example migration]) * XUL <ttcode>stringbundleset</ttcode> / <ttcode>stringbundle</ttcode>. You will also be unable to use the `nsIStringBundleService` interface.<br/>Replacement: Use <ttcode>Services.strings.createBundle(...)</ttcode>.<br/>In order to use stringbundles, you need to load stringbundle.js in your XUL: <ttcode>&lt;script type="application/x-javascript" src="chrome://global/content/elements/stringbundle.js"/&gt;</ttcode>, but the XUL Overlay loader takes care of this. See also [https://bugzil.la/1459743 bug 1459743].
{{note|I am not sure the above information is correct with current Thunderbird trunk builds as of March 30, 2019. I got errors when attempting to embed <ttcode>stringbundle</ttcode> elements in XUL overlays. [[User:Jikamens|Jikamens]] ([[User talk:Jikamens|talk]]) 00:34, 31 March 2019 (UTC)}}* <ttcode>mailServices.js</ttcode> has been renamed to <ttcode>MailServices.jsm</ttcode>. The old name keeps working for now, but you get a deprecation warning in the error console if you use the old name.
* Starting in Thunderbird 63, all XBL-bindings will be removed from Thunderbird. That means, that if you have a XBL=binding in your add-on that extends a binding that is removed, your binding will fail. With [https://bugzilla.mozilla.org/buglist.cgi?o1=equals&v1=1484976&f1=blocked this] query, you can see all the bugs related to de-xbl-ing Thunderbird, and see how the removal of each binding is handled.
* A bunch of globals in the message composition window were removed: <ttcode>nsIMsgCompDeliverMode</ttcode>, <ttcode>nsIMsgCompSendFormat</ttcode>, <ttcode>nsIMsgCompConvertible</ttcode>, <ttcode>nsIMsgCompType</ttcode>, <ttcode>nsIMsgCompFormat</ttcode>, <ttcode>nsIAbPreferMailFormat</ttcode>, <ttcode>nsIPlaintextEditorMail</ttcode>, <ttcode>nsISupportsString</ttcode>, and <ttcode>mozISpellCheckingEngine</ttcode>. If you use any of these, there are available as the same names underneath <ttcode>Ci.</ttcode> (a.k.a. <ttcode>Components.interfaces.</ttcode>).
== Removed in Thunderbird 64 ==
* XUL element <ttcode>colorpicker</ttcode>.<br/>Replacement: HTML <ttcode>input type=color</ttcode>
== Removed in Thunderbird 65 ==
* XUL element <ttcode>progressmeter</ttcode>.<br/>Replacement: HTML <ttcode>progress</ttcode> ([https://github.com/jobisoft/CategoryManager/commit/be23d9abfba29e5585d485348d84bd36c3c6bcaf example migration])
* There is no longer a <ttcode>statusbar</ttcode> element. Instead of putting <ttcode>statusbar</ttcode> elements inside a <ttcode>statusbarpanel</ttcode> in your XUL, they need to go inside an <ttcode>hbox</ttcode>. The <ttcode>hbox</ttcode> contains have the same names as the old <ttcode>statsusbarstatusbar</ttcode> containers, so you just need to change the element type. Also, if your status bar items had popup menus attached to them, you will need to do that differently now as well. See [https://github.com/jikamens/send-later/blob/664468e4c29ba435edfeba8524d19a37a47dfda5/chrome/content/backgrounding.xul#L9 this example].
== Changes in Thunderbird 67 ==
* Thunderbird no longer passes in the The <ttcode>aContextnsIRequestObserver.onStopRequest</ttcode> argument to the and <ttcode>nsIStreamListener.onDataAvailable</ttcode> methods of stream listeners, so interfaces have changed. The <code>aContext</code> argument has been removed. Especially stream listeners need to be updated so that they no longer expect this argument.
* <ttcode>MailUtils.getFolderForUri</ttcode> was renamed to <ttcode>MailUtils.getExistingFolder</ttcode>.
==== Importing javascript modules ====
==== Editable menulists ====
The standard XUL element <ttcode>menulist</ttcode> no longer supports the <ttcode>editable</ttcode> attribute. However, editable menulists have been re-implemented using a custom element. To be able to use it, one has to include <ttcode>menulist.css</ttcode> and <ttcode>customElements.js</ttcode>:
<source lang="xml">
316
edits

Navigation menu