This is an archived page. It's not actively maintained.



Support for extensions using XUL/XPCOM or the Add-on SDK was removed in Firefox 57, released November 2017. As there is no supported version of Firefox enabling these technologies, this page will be removed by December 2020.

Add-ons using the techniques described in this document are considered a legacy technology in Firefox. Don't use these techniques to develop new add-ons. Use WebExtensions instead. If you maintain an add-on which uses the techniques described here, consider migrating it to use WebExtensions.

Starting from Firefox 53, no new legacy add-ons will be accepted on (AMO) for desktop Firefox and Firefox for Android.

Starting from Firefox 57, only extensions developed using WebExtensions APIs will be supported on Desktop Firefox and Firefox for Android.

Even before Firefox 57, changes coming up in the Firefox platform will break many legacy extensions. These changes include multiprocess Firefox (e10s), sandboxing, and multiple content processes. Legacy extensions that are affected by these changes should migrate to use WebExtensions APIs if they can. See the "Compatibility Milestones" document for more information.

A wiki page containing resources, migration paths, office hours, and more, is available to help developers transition to the new technologies.


Wrapping contents

In HTML you can use a DIV as a container and when the DIV changes size, the contents will wrap or adjust the layout. This does not happen with XUL BOX (or HBOX and VBOX) by default. However, you can easily add this capability with a style change. Make the BOX style="display: block" and the wrapping behavior will occur when the box is resized:

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window id="yourwindow" xmlns="">

<hbox style="display: block">
  <label value="AAA"/>
  <label value="BBB"/>
  <label value="CCC"/>
  <label value="DDD"/>
  <label value="EEE"/>
  <label value="FFF"/>
  <label value="GGG"/>
  <label value="HHH"/>
  <label value="III"/>
  <label value="JJJ"/>
  <label value="KKK"/>
  <label value="LLL"/>
  <label value="MMM"/>
  <label value="NNN"/>
  <label value="OOO"/>
  <label value="PPP"/>
  <label value="QQQ"/>
  <label value="RRR"/>
  <label value="SSS"/>
  <label value="TTT"/>
  <label value="UUU"/>
  <label value="VVV"/>
  <label value="WWW"/>
  <label value="XXX"/>
  <label value="YYY"/>
  <label value="ZZZ"/>



If you put IMAGE in the contents, you should probably add align="start" attribute to the BOX. This keeps the image from stretching inside the box:

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window xmlns="">

<box align="start" style="display:block">
  <image src="chrome://global/skin/icons/Error.png" style="padding:5px"/>
  <textbox />
  <image src="chrome://global/skin/icons/Error.png" style="padding:5px"/>
  <button label="Hello"/>
  <image src="chrome://global/skin/icons/Error.png" style="padding:5px"/>