updateEvents(element2) {
      Logger.debug("EventManager: Updating events for", element2);
      Array.from(element2.attributes || []).forEach((attr) => {
        if (attr.name.startsWith("@")) {
          const eventName = attr.name.substring(1);
          const handler = attr.value.trim();
          this.bindEventHandler(element2, eventName, handler);
          element2.removeAttribute(attr.name);
        }
      });
    }
Releases all resources and removes all events