Changes

Jump to: navigation, search

Thunderbird/Add-ons Guide 63

1,033 bytes added, 20:43, 28 February 2019
Add information about editable menulists
* XUL element <tt>progressmeter</tt>.<br/>Replacement: HTML <tt>progress</tt> ([https://github.com/jobisoft/CategoryManager/commit/be23d9abfba29e5585d485348d84bd36c3c6bcaf example migration])
== Removed 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:
<source lang="javascript">
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 ==
More information about updating extensions for Thunderbird 68 can be found [https://thunderbird-webextensions.readthedocs.io/en/latest/how-to/extensions68.html here].
12
edits

Navigation menu