set arrowTarget(val) {
    const isString = typeof val === 'string' && val.length;
    const isElem = val instanceof HTMLElement;

    if (!isString && !isElem) {
      if (this.#arrowTarget !== undefined) {
        this.#arrowTarget = undefined;
        this.removeAttribute(attributes.ARROW_TARGET);
      }
      return;
    }

    let elem;
    if (isString) {
      // @TODO Harden for security (XSS)
      const rootNode = IdsDOMUtils.getClosestRootNode(this);
      elem = rootNode.querySelector(val);
      if (!(elem instanceof HTMLElement)) {
        return;
      }
      this.setAttribute(attributes.ARROW_TARGET, val);
    } else {
      elem = val;
    }

    if (!this.#arrowTarget || !this.#arrowTarget.isEqualNode(elem)) {
      this.#arrowTarget = elem;
      this.#setArrowDirection('', this.arrow);
    }
  }
/**
   * Sets the element to align with via a css selector
   * @param {any} val ['string|HTMLElement'] a CSS selector string
   */
Sets the element to align with via a css selector
@param {any} val ['string|HTMLElement'] a CSS selector string
Sets the element to align with via a css selector @param { any } val [ ' string|HTMLElement ' ] a CSS selector string
set arrowTarget(val) {
    const isString = typeof val === 'string' && val.length;
    const isElem = val instanceof HTMLElement;
    if (!isString && !isElem) {
      if (this.#arrowTarget !== undefined) {
        this.#arrowTarget = undefined;
        this.removeAttribute(attributes.ARROW_TARGET);
      }
      return;
    }
    let elem;
    if (isString) {
      const rootNode = IdsDOMUtils.getClosestRootNode(this);
      elem = rootNode.querySelector(val);
      if (!(elem instanceof HTMLElement)) {
        return;
      }
      this.setAttribute(attributes.ARROW_TARGET, val);
    } else {
      elem = val;
    }
    if (!this.#arrowTarget || !this.#arrowTarget.isEqualNode(elem)) {
      this.#arrowTarget = elem;
      this.#setArrowDirection('', this.arrow);
    }
  }
set arrowTarget ( val ) { const isString = typeof val === 'string' && val . length ; const isElem = val instanceof HTMLElement ; if ( ! isString && ! isElem ) { if ( this . #arrowTarget !== undefined ) { this . #arrowTarget = undefined ; this . removeAttribute ( attributes . ARROW_TARGET ) ; } return ; } let elem ; if ( isString ) { const rootNode = IdsDOMUtils . getClosestRootNode ( this ) ; elem = rootNode . querySelector ( val ) ; if ( ! ( elem instanceof HTMLElement ) ) { return ; } this . setAttribute ( attributes . ARROW_TARGET , val ) ; } else { elem = val ; } if ( ! this . #arrowTarget || ! this . #arrowTarget . isEqualNode ( elem ) ) { this . #arrowTarget = elem ; this . #setArrowDirection ( '' , this . arrow ) ; } }
Sets the element to align with via a css selector
 @param {any} val ['string|HTMLElement'] a CSS selector string
Sets the element to align with via a css selector @param { any } val [ ' string|HTMLElement ' ] a CSS selector string
// @TODO Harden for security (XSS)