Thunderbird/Add-ons Guide 57: Difference between revisions

group TB specific changes and add replacement proposals
(More.)
(group TB specific changes and add replacement proposals)
Line 3: Line 3:
'''FIRST DRAFT'''
'''FIRST DRAFT'''


Mozilla core have disabled "legacy" add-ons in Firefox 57. Since this type of add-on is not supported from mozilla57 any more, a lot of interfaces have been removed from Mozilla core.
Mozilla core have disabled "legacy" add-ons (not based purely on WebExtensions) in Firefox 57. Since this type of add-on is not supported from mozilla57 any more, a lot of interfaces have been removed from Mozilla core.
 
However, Thunderbird 57-59 and Seamonkey still support these addons if the appropriate modifications are done to adapt to the changed interfaces.


These are:
These are:


* Removed in mozilla57:
* Removed in mozilla57:
** nsILocalFile
** nsILocalFile -- replacement: nsIFile
** steelIApplication
** extIApplication, nsIEntityConverter
** extIApplication, nsIEntityConverter
** nsIProgrammingLanguage
** nsIProgrammingLanguage
** nsILocaleService and friends
** nsILocaleService and friends
** nsIScriptableDateFormat
** nsIScriptableDateFormat -- replacement: Intl.DateTimeFormat
** nsIFilePicker.show()
** nsIFilePicker.show() -- replacement: nsIFilePicker.open()
** nsIDownloadManager
** nsIDownloadManager
** Promise.jsm
** Promise.jsm
** nsIPrefBranch2 and nsIPrefBranchInternal
** nsIPrefBranch2 and nsIPrefBranchInternal -- replacement: nsIPrefBranch
** nsIExternalProtocolService::LoadUrl
** nsIExternalProtocolService::LoadUrl


* JS and XUL changes in mozilla57 [https://www.fxsitecompat.com/en-CA/versions/57/]
* JS and XUL changes in mozilla57 [https://www.fxsitecompat.com/en-CA/versions/57/]
** for (x in fixIterator(obj))
** `for each ()` construct [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for_each...in] -- replacement: 'for (x of object)' or 'for (x of Object.values())'
** `for each` construct [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for_each...in]
** `with` construct [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/with]
** `with` construct [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/with]
** catch (ex if ex instanceof ExceptionType)
** catch (ex if ex instanceof ExceptionType) (actually removed in mozilla47 already)
** In XUL files, JS files are linked in with <script type="application/x-javascript" ... > or <script type="application/x-javascript;version=1.7" ... > (remove `x-` and version)
** versioned Javascript support -- replacement: In XUL files, links to JS files using <script type="application/x-javascript" ... > or <script type="application/x-javascript;version=1.7" ... >, change to <script type="application/javascript" ... >
** __iterator__ and Iterator()
 
* Changes in thunderbird57
** steelIApplication (removed due to removal of extIApplication) -- replacement: Services, AppConstants
** for (x in fixIterator(obj)) (removed due to removal of __iterator__) -- replacement: for (x of fixIterator(obj))
 


* Removed in mozilla58
* Removed in mozilla58
** Date.prototype.toLocaleFormat
** Date.prototype.toLocaleFormat
** {get,set}ComplexValue use of nsISupportsString
** {get,set}ComplexValue use of nsISupportsString -- replacement: {get,set}StringPref()
** Mechanism to store add-on preferences in defaults/preferences/xx.js. See {{bug|1414398}}. '''Thunderbird 58 Beta not affected due to backout of this core change.'''
** Mechanism to store add-on preferences in defaults/preferences/xx.js. See {{bug|1414398}}. '''Thunderbird 58 Beta not affected due to backout of this core change.'''


* JS changes in mozilla58 [https://www.fxsitecompat.com/en-CA/versions/58/]
* JS changes in mozilla58 [https://www.fxsitecompat.com/en-CA/versions/58/]
** StopIteration [https://developer.mozilla.org/en-US/docs/Archive/Web/StopIteration]
** StopIteration [https://developer.mozilla.org/en-US/docs/Archive/Web/StopIteration]


* Removed in mozilla59
* Removed in mozilla59
91

edits