addon/components/basic-dropdown-content.js
function dropdownIsValidParent(el, dropdownId) {
  let closestDropdown = closestContent(el);
  if (closestDropdown) {
    let trigger = document.querySelector(`[aria-owns=${closestDropdown.attributes.id.value}]`);
    let parentDropdown = closestContent(trigger);
    return parentDropdown && parentDropdown.attributes.id.value === dropdownId || dropdownIsValidParent(parentDropdown, dropdownId);
  } else {
    return false;
  }
}
function dropdownIsValidParent(el, dropdownId) {
  let closestDropdown = closestContent(el);
  if (closestDropdown) {
    let trigger = document.querySelector(`[aria-owns=${closestDropdown.attributes.id.value}]`);
    let parentDropdown = closestContent(trigger);
    return parentDropdown && parentDropdown.attributes.id.value === dropdownId || dropdownIsValidParent(parentDropdown, dropdownId);
  } else {
    return false;
  }
}
function dropdownIsValidParent ( el , dropdownId ) { let closestDropdown = closestContent ( el ) ; if ( closestDropdown ) { let trigger = document . querySelector ( ` ${ closestDropdown . attributes . id . value } ` ) ; let parentDropdown = closestContent ( trigger ) ; return parentDropdown && parentDropdown . attributes . id . value === dropdownId || dropdownIsValidParent ( parentDropdown , dropdownId ) ; } else { return false ; } }
Evaluates if the given element is in a dropdown or any of its parent dropdowns.

@param {HTMLElement} el
@param {String} dropdownId
Evaluates if the given element is in a dropdown or any of its parent dropdowns .