12
edits
(document various things I ran into while upgrading my add-on for Thunderbird 68) |
John.bieling (talk | contribs) (Update link to add-on update guide) |
||
| (5 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
<big>'''Add-ons Guide for Thunderbird 63 and beyond'''</big> | <big>'''Add-ons Guide for Thunderbird 63 and beyond'''</big> | ||
{{note| | {{note|This guide has been deprecated. All its information has been moved to [https://developer.thunderbird.net/add-ons/updating developer.thunderbird.net]. Please do not add new information to this wiki, but get in contact with us and share what is missing and it will be added to the official guide. The goal is to have one single source of information.}} | ||
'''Contact:''' Check the mozilla.dev.apps.thunderbird newsgroup and our [[Thunderbird/CommunicationChannels#If_you.27re_a_developer|communication channels]]. | |||
__TOC__ | __TOC__ | ||
| Line 51: | Line 51: | ||
</source> | </source> | ||
The key < | The key <code>open_in_tab</code> is optional and defaults to value false. Value true corresponds to <code>optionsType 3</code> in <code>install.rdf</code>. | ||
Examples of extensions converted to this type (as of 3rd December 2018): | Examples of extensions converted to this type (as of 3rd December 2018): | ||
| Line 59: | Line 59: | ||
* "Signature Switch" | * "Signature Switch" | ||
* "ThunderHTMLedit" | * "ThunderHTMLedit" | ||
* [https://github.com/jikamens/send-later/ Send Later] | |||
== Removed in Thunderbird 60 == | == 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 < | 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 <code>mailWindowOverlay.xul</code>, that needs to be changed; in this example you most likely need to overlay <code>messenger.xul</code> now. | ||
== Removed in Thunderbird 61 == | == Removed in Thunderbird 61 == | ||
* XUL element method < | * XUL element method <code>.insertItemAt()</code>, replacement: <code>.insertBefore()</code> | ||
* XUL element method < | * XUL element method <code>.removeItemAt()</code>, replacement: <code>.remove()</code>, example: <code>listElement.removeItemAt(i)</code> -> <code>listElement.getItemAtIndex(i).remove()</code> | ||
* You can also use < | * You can also use <code>.setUnsafeInnerHTML()</code> or <code>document.allowUnsafeHTML = true</code>, as a workaround to the above, see [[Thunderbird/Add-ons_Guide_57#Removed_and_changed_in_mozilla60|here]]. | ||
* The interface of < | * The interface of <code>AddonManager.getAddonByID</code> has changed. It now returns a promise, so instead of calling it as <code>AddonManager.getAddonByID(''addon_id'', ''callback_function'')</code>, you need to call it as <code>AddonManager.getAddonByID(''addon_id'').then(''callback_function')</code>. | ||
== Removed in Thunderbird 63 == | == Removed in Thunderbird 63 == | ||
* XUL elements < | * XUL elements <code>listbox</code>, <code>listboxitem</code> and <code>listcell</code>. <br/>Replacement: <code>richlistbox</code> ([https://github.com/jobisoft/CategoryManager/commit/2267888be7de0d7ebe4f5b4626c48210c071b16f example migration]) | ||
* XUL < | * XUL <code>stringbundleset</code> / <code>stringbundle</code>. You will also be unable to use the `nsIStringBundleService` interface.<br/>Replacement: Use <code>Services.strings.createBundle(...)</code>. | ||
* <code>mailServices.js</code> has been renamed to <code>MailServices.jsm</code>. 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: <code>nsIMsgCompDeliverMode</code>, <code>nsIMsgCompSendFormat</code>, <code>nsIMsgCompConvertible</code>, <code>nsIMsgCompType</code>, <code>nsIMsgCompFormat</code>, <code>nsIAbPreferMailFormat</code>, <code>nsIPlaintextEditorMail</code>, <code>nsISupportsString</code>, and <code>mozISpellCheckingEngine</code>. If you use any of these, there are available as the same names underneath <code>Ci.</code> (a.k.a. <code>Components.interfaces.</code>). | |||
== Removed in Thunderbird 64 == | == Removed in Thunderbird 64 == | ||
* XUL element < | * XUL element <code>colorpicker</code>.<br/>Replacement: HTML <code>input type=color</code> | ||
== Removed in Thunderbird 65 == | == Removed in Thunderbird 65 == | ||
* XUL element < | * XUL element <code>progressmeter</code>.<br/>Replacement: HTML <code>progress</code> ([https://github.com/jobisoft/CategoryManager/commit/be23d9abfba29e5585d485348d84bd36c3c6bcaf example migration]) | ||
* There is no longer a < | * There is no longer a <code>statusbar</code> element. Instead of putting <code>statusbar</code> elements inside a <code>statusbarpanel</code> in your XUL, they need to go inside an <code>hbox</code>. The <code>hbox</code> contains have the same names as the old <code>statusbar</code> 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 == | == Changes in Thunderbird 67 == | ||
* | * The <code>nsIRequestObserver.onStopRequest</code> and <code>nsIStreamListener.onDataAvailable</code> 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. | ||
* < | * <code>MailUtils.getFolderForUri</code> was renamed to <code>MailUtils.getExistingFolder</code>. | ||
==== Importing javascript modules ==== | ==== Importing javascript modules ==== | ||
| Line 117: | Line 117: | ||
==== Editable menulists ==== | ==== Editable menulists ==== | ||
The standard XUL element < | The standard XUL element <code>menulist</code> no longer supports the <code>editable</code> attribute. However, editable menulists have been re-implemented using a custom element. To be able to use it, one has to include <code>menulist.css</code> and <code>customElements.js</code>: | ||
<source lang="xml"> | <source lang="xml"> | ||
| Line 148: | Line 148: | ||
== See also == | == See also == | ||
More information about updating extensions for Thunderbird 68 can be found [https://thunderbird | More information about updating extensions for Thunderbird 68 can be found [https://developer.thunderbird.net/add-ons/tb68 here]. | ||
edits