B2G/gecko/toolkit/mozapps/extensions/AddonManager.jsm
/**
   * Adds a new AddonListener if the listener is not already registered.
   *
   * @param  aListener
   *         The AddonListener to add
   */
Adds a new AddonListener if the listener is not already registered.
@param  aListener
The AddonListener to add
Adds a new AddonListener if the listener is not already registered . @param aListener The AddonListener to add
function AMI_addAddonListener(aListener) {
    if (!aListener || typeof aListener != "object")
      throw Components.Exception("aListener must be an AddonListener object",
                                 Cr.NS_ERROR_INVALID_ARG);
    if (!this.addonListeners.some(function(i) { return i == aListener; }))
      this.addonListeners.push(aListener);
  }
function AMI_addAddonListener ( aListener ) { if ( ! aListener || typeof aListener != "object" ) throw Components . Exception ( "aListener must be an AddonListener object" , Cr . NS_ERROR_INVALID_ARG ) ; if ( ! this . addonListeners . some ( function ( i ) { return i == aListener ; } ) ) this . addonListeners . push ( aListener ) ; }
Adds a new AddonListener if the listener is not already registered.
Adds a new AddonListener if the listener is not already registered .