12
edits
John.bieling (talk | contribs) (Add example migration for progressmeter) |
John.bieling (talk | contribs) (Add information about editable menulists) |
||
Line 78: | Line 78: | ||
* XUL element <tt>progressmeter</tt>.<br/>Replacement: HTML <tt>progress</tt> ([https://github.com/jobisoft/CategoryManager/commit/be23d9abfba29e5585d485348d84bd36c3c6bcaf example migration]) | * XUL element <tt>progressmeter</tt>.<br/>Replacement: HTML <tt>progress</tt> ([https://github.com/jobisoft/CategoryManager/commit/be23d9abfba29e5585d485348d84bd36c3c6bcaf example migration]) | ||
== | == Changes in Thunderbird 67 == | ||
==== Importing javascript modules ==== | |||
A major backwards-incompatible change was made to importing javascript modules. Where once you used any of these: | A major backwards-incompatible change was made to importing javascript modules. Where once you used any of these: | ||
<source lang="javascript"> | <source lang="javascript"> | ||
Line 102: | Line 103: | ||
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. | 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. | ||
==== Editable menulists ==== | |||
The standard XUL element <tt>menulist</tt> no longer supports the <tt>editable</tt> attribute. However, editable menulists have been re-implemented using a custom element. To be able to use it, one has to include <tt>menulist.css</tt> and <tt>customElements.js</tt>: | |||
<source lang="xml"> | |||
<?xml version="1.0"?> | |||
<?xml-stylesheet href="chrome://messenger/content/menulist.css" type="text/css"?> | |||
... | |||
<script type="application/javascript" src="chrome://messenger/content/customElements.js"/> | |||
... | |||
<menulist is="menulist-editable" editable="true"> | |||
<menupopup> | |||
<menuitem label="Label1" /> | |||
</menupopup> | |||
</menulist> | |||
... | |||
</source> | |||
To be able to use this custom element from JS, the following is needed (in addition to the includes mentioned above): | |||
<source lang="javascript"> | |||
let menulist = document.createElement("menulist", { is : "menulist-editable"}); | |||
menulist.setAttribute("is", "menulist-editable"); | |||
menulist.setAttribute("editable", "true"); | |||
</source> | |||
== See also == | == 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]. | More information about updating extensions for Thunderbird 68 can be found [https://thunderbird-webextensions.readthedocs.io/en/latest/how-to/extensions68.html here]. |
edits