Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Add Toolbar Button

Example XUL overlay file:

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://demo/skin/overlay.css" type="text/css" ?>

<overlay id="messengerWindow" xmlns="https://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  <script type="application/x-javascript" src="overlay.js" />
  <toolbarpalette id="MailToolbarPalette">
    <toolbarbutton id="demo-button"
      class="demo-button toolbarbutton-1"
      label="Demo"
      type="button"
      oncommand="Demo.load();"
      />
  </toolbarpalette>
</overlay>

Add this to the css file you referenced in your xul file:

#demo-button, [place="palette"] > #demo-button {
  list-style-image: url("chrome://demo/skin/icon.png") !important;
}

Document Tags and Contributors

 Contributors to this page: wbamberg, One
 Last updated by: wbamberg,