B2G/gecko/dom/apps/src/AppsUtils.jsm
/**
   * Determines whether the manifest allows installs for the given origin.
   * @param object aManifest
   * @param string aInstallOrigin
   * @return boolean
   **/
Determines whether the manifest allows installs for the given origin.
@param object aManifest
@param string aInstallOrigin
@return boolean
Determines whether the manifest allows installs for the given origin . @param object aManifest @param string aInstallOrigin @return boolean
function checkInstallAllowed(aManifest, aInstallOrigin) {
    if (!aManifest.installs_allowed_from) {
      return true;
    }
    function cbCheckAllowedOrigin(aOrigin) {
      return aOrigin == "*" || aOrigin == aInstallOrigin;
    }
    return aManifest.installs_allowed_from.some(cbCheckAllowedOrigin);
  }
function checkInstallAllowed ( aManifest , aInstallOrigin ) { if ( ! aManifest . installs_allowed_from ) { return true ; } function cbCheckAllowedOrigin ( aOrigin ) { return aOrigin == "*" || aOrigin == aInstallOrigin ; } return aManifest . installs_allowed_from . some ( cbCheckAllowedOrigin ) ; }
Determines whether the manifest allows installs for the given origin.
Determines whether the manifest allows installs for the given origin .