Changes

Jump to: navigation, search

Thunderbird/Add-ons Guide 63

1,213 bytes added, 08:20, 27 February 2019
Add section about ChromeUtils and link to readthedocs about extensions for TB68
== Removed in Thunderbird 65 ==
* XUL element <tt>progressmeter</tt>.<br/>Replacement: HTML <tt>progress</tt>
 
== Removed in Thunderbird 67 ==
A major backwards-incompatible change was made to importing javascript modules. Where once you used any of these:
<source lang="javascript">
Components.utils.import("resource://foo/modules/Foo.jsm");
// or…
Cu.import("resource://foo/modules/Foo.jsm");
// or…
ChromeUtils.defineModuleGetter(this, "Foo", "resource://foo/modules/Foo.jsm");
 
// or the two-argument variation:
var { Foo } = Cu.import("resource://foo/modules/Foo.jsm", null);
// or…
var scope = {}; Cu.import("resource://foo/modules/Foo.jsm", scope); // scope.Foo…
</source>
 
You should now do this:
 
<source lang="javascript">
var { Foo } = ChromeUtils.import("resource://foo/modules/Foo.jsm");
// or…
var scope = ChromeUtils.import("resource://foo/modules/Foo.jsm"); // scope.Foo…
</source>
 
ChromeUtils.import is a replacement for Components.utils.import (which was also changed) in this way. Note that no second argument is supplied. The returned object is a dictionary of only the objects listed in EXPORTED_SYMBOLS.
 
== See also ==
 
More information about updating extensions for Thunderbird 68 can be found [https://thunderbird-webextensions.readthedocs.io/en/latest/how-to/extensions68.html here].
52
edits

Navigation menu