diff --git a/packages/web/src/observers/general/GeneralObserver.ts b/packages/web/src/observers/general/GeneralObserver.ts index b5ebf0d108..828619b13f 100644 --- a/packages/web/src/observers/general/GeneralObserver.ts +++ b/packages/web/src/observers/general/GeneralObserver.ts @@ -200,9 +200,16 @@ export function GeneralObserver() { handleKeyAttribute(targetElement, true); handleNodes(nodeHandler.handleChildList([targetElement])); + const monitorAttributeList = new Set(); + monitorAttributeList.add(TOLGEE_WRAPPED_ONLY_DATA_ATTRIBUTE); + Object.values(options.tagAttributes).forEach((attrs) => + attrs.forEach((attr) => monitorAttributeList.add(attr.toLowerCase())) + ); + // then observe for changes observer.observe(targetElement, { attributes: true, + attributeFilter: [...monitorAttributeList], childList: true, subtree: true, characterData: true,