4
edits
(added .innerHTML) |
(→Other changes relevant for TB60: Spilling from TB 67 nback into TB 60) |
||
| (5 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
<big>'''Add-ons Guide for Thunderbird 57 to Thunderbird 60 ESR'''</big> | <big>'''Add-ons Guide for Thunderbird 57 to Thunderbird 60 ESR'''</big> | ||
(For developer information about Thunderbird 61 and beyond visit the [ | (For developer information about Thunderbird 61 and beyond visit the [[Thunderbird/Add-ons Guide 63|Add-ons Guide 63]]. Note: Thunderbird 61 and 62 betas were skipped. The next beta after 60 is 63.) | ||
'''Ask Questions, Get Help''': Developers are encouraged to ask for help and advice in the mozilla.dev.apps.thunderbird newsgroup | '''Ask Questions, Get Help''': Developers are encouraged to ask for help and advice in the mozilla.dev.apps.thunderbird newsgroup, see [[Thunderbird/CommunicationChannels#If_you.27re_a_developer|Communication Channels]]. Please check this document and ask questions in a forum before filing a bug report. Also, if you target version is 60, test and fix your add-on using [https://getthunderbird.com version 60 release], not nightly builds or beta. | ||
'''Legacy, pre-version 57 add-ons''' - '''Thunderbird 57-60 (and Seamonkey) <u>still support</u> legacy add-ons''' (except binary add-ons, see [[#Removed_in_mozilla53|below]]), but all add-on authors must check to see whether code changes are needed. The complexity of the add-on determines how it is affected - many add-ons are not heavily affected, some not affected at all. '''Some add-ons do not need any code changes, and some only trivial or minor refactoring or name changes. Some need to adapt to changed interfaces. Some only need changes to startup and intialization, others may need more extensive changes.''' A non-exhaustive list of of things to be modified is below. Every beta from 57 to 60 delivered changes. So for example if your add-on is compatible with beta 58 you may still need to make further changes. Example changes to version 59 involve {{bug|1414398}} default preferences, and {{Bug|1419145}} menu to access add-on options and tab options. | '''Legacy, pre-version 57 add-ons''' - '''Thunderbird 57-60 (and Seamonkey) <u>still support</u> legacy add-ons''' (except binary add-ons, see [[#Removed_in_mozilla53|below]]), but all add-on authors must check to see whether code changes are needed. The complexity of the add-on determines how it is affected - many add-ons are not heavily affected, some not affected at all. '''Some add-ons do not need any code changes, and some only trivial or minor refactoring or name changes. Some need to adapt to changed interfaces. Some only need changes to startup and intialization, others may need more extensive changes.''' A non-exhaustive list of of things to be modified is below. Every beta from 57 to 60 delivered changes. So for example if your add-on is compatible with beta 58 you may still need to make further changes. Example changes to version 59 involve {{bug|1414398}} default preferences, and {{Bug|1419145}} menu to access add-on options and tab options. | ||
| Line 126: | Line 126: | ||
* Assignment to .innerHTML of an element does not work any more in chrome documents. As a temporary workaround, .setUnsafeInnerHTML or |document.allowUnsafeHTML = true;| can be used. This workaround was removed at mozilla61. The correct solution is to use .textContent, document.createElement(), DOMParser.parseFromString or document.execCommand("insertHTML", ...). Note that the jQuery library uses .innerHTML. | * Assignment to .innerHTML of an element does not work any more in chrome documents. As a temporary workaround, .setUnsafeInnerHTML or |document.allowUnsafeHTML = true;| can be used. This workaround was removed at mozilla61. The correct solution is to use .textContent, document.createElement(), DOMParser.parseFromString or document.execCommand("insertHTML", ...). Note that the jQuery library uses .innerHTML. | ||
* Expression Closures have been dropped: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Expression_closures (use arrow functions). | * Expression Closures have been dropped: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Expression_closures (use arrow functions). | ||
== Other changes relevant for TB60 == | |||
* TB does no longer automatically pick up code changes if the addon is in a directory. Code changes are only picked up if install.rdf is changed. Also, it appears that TB needs to be restarted twice for the new code to come over (e.g. by restart addon or manually). | |||
* Certain ways of defining Cu, Ci etc. do not work any longer, because Cc, Ci, Cu, and Cr are now defined by default in chrome (e.g. this does not work: const {classes: Cc, interfaces: Ci, utils: Cu, results : Cr} = Components; as found in some addons) | |||
* Since ca. 60.6.1: Importing modules must be done like this: var { Gloda } = ChromeUtils.import("resource:///modules/gloda/public.js");, see TB 68 guide for more explanation | |||
== Also Note == | == Also Note == | ||
The list above only contains selected changes relevant to '''Thunderbird''' add-ons. A larger list, some of which are only relevant to Firefox, can be seen at [https://developer.mozilla.org/en-US/Firefox/Releases Firefox developer release notes] where all the details, bugzilla bug reports and patches implementing the above changes, and more, can be found. If you find something missing in the list above, please tell us <tbd>. | The list above only contains selected changes relevant to '''Thunderbird''' add-ons. A larger list, some of which are only relevant to Firefox, can be seen at [https://developer.mozilla.org/en-US/Firefox/Releases Firefox developer release notes] where all the details, bugzilla bug reports and patches implementing the above changes, and more, can be found. If you find something missing in the list above, please tell us <tbd>. | ||
edits