third_party/js/mozmill/shared-modules/addons.js
function addonsManager_installAddon(aSpec) {
    var spec = aSpec || { };
    var addon = spec.addon;
    var timeout = spec.timeout;
    var button = "install";
    var waitFor = (spec.waitFor == undefined) ? true : spec.waitFor;

    var button = this.getAddonButton({addon: addon, button: button});
    this._controller.click(button);

    if (waitFor)
      this.waitForDownloaded({addon: addon, timeout: timeout});
  }
function addonsManager_installAddon(aSpec) {
    var spec = aSpec || { };
    var addon = spec.addon;
    var timeout = spec.timeout;
    var button = "install";
    var waitFor = (spec.waitFor == undefined) ? true : spec.waitFor;

    var button = this.getAddonButton({addon: addon, button: button});
    this._controller.click(button);

    if (waitFor)
      this.waitForDownloaded({addon: addon, timeout: timeout});
  }
function addonsManager_installAddon ( aSpec ) { var spec = aSpec || { } ; var addon = spec . addon ; var timeout = spec . timeout ; var button = "install" ; var waitFor = ( spec . waitFor == undefined ) ? true : spec . waitFor ; var button = this . getAddonButton ( { addon : addon , button : button } ) ; this . _controller . click ( button ) ; if ( waitFor ) this . waitForDownloaded ( { addon : addon , timeout : timeout } ) ; }
Installs the specified add-on

@param {object} aSpec
Information on which add-on to operate on
Elements: addon   - Add-on element
waitFor - Wait until the category has been selected
[optional - default: true]
timeout - Duration to wait for the download
[optional - default: 15s]
Installs the specified add - on