addEventListener(obj, type, func, persistent, capture) {
    if (!obj) {
      return;
    }
    if (!persistent) {
      this.eventHandlers.push({ id: this.id, obj, type, func });
    }
    if ('addEventListener' in obj) {
      obj.addEventListener(type, func, !!capture);
    }
    else if ('attachEvent' in obj) {
      obj.attachEvent(`on${type}`, func);
    }

    return this;
  }
Wrapper method to add an event listener to an HTML element.
@param {HtmlElement} obj - The DOM element to add the event to.
@param {string} type - The event name to add.
@param {Function} func - The callback function to be executed when the listener is triggered.
@param {boolean} persistent - If this listener should persist beyond "destroy" commands.
@param {boolean} capture - If this listener should be executed in the capture phase.
@returns {void | this} - The instance of the element.