off(event, cb) {
    if (!this.events) {
      return;
    }

    const type = `${this.options.namespace}.${event}`;

    this.events.listeners(type).forEach((listener) => {
      // Ensure the listener is for this element
      if (!listener || listener.id !== this.id) {
        return;
      }

      // If there is a given callback, only deal with the match
      if (cb && cb !== listener) {
        return;
      }

      this.events.off(type, listener);
    });
  }
Removes a listener for a certain event. Not passing the 2nd arg will remove all listeners for that event.
@param {string} event - The event you wish to register the handler for.
@param {Function | undefined} cb - The callback handler to handle this event.