Responding to HTML Changes in a Web Component #20
Replies: 2 comments 1 reply
-
Nice one, we had the same issue, so we decided to implement a library to handle and other common requirements, something can be integrated with any website without dependencies or frameworks |
Beta Was this translation helpful? Give feedback.
-
Well, sort of ... you have to know the list of attrs that you want to observe. As I understand, it was done that way for performance reasons, but there are more than a few scenarios where getting updates for attrs you don't know (for example, to pass them to child elements who do know) would be super handy. So MutationObserver still comes in handy for those situations. |
Beta Was this translation helpful? Give feedback.
-
Responding to HTML Changes in a Web Component
Using MutationObserver in a web component to detect changes.
https://www.raymondcamden.com/2024/03/13/responding-to-html-changes-in-a-web-component
Beta Was this translation helpful? Give feedback.
All reactions