Closed woble closed 8 years ago
Attribute mutations may happen quite frequently and it is also common to change the class
attribute of the <html>
element. This would eventually cause performance issues, because all container queries on the page would have to be checked if <html>
or <body>
gets changed.
If you’re using a JavaScript framework, it may be possible to hook into the modifications without an MutationObserver and then call the prolyfill API. If this is not possible or doesn’t make sense in your use case you can create a MutationObserver yourself to trigger the changes.
Is there a particular reason why attribute mutations (e.g.
class
being changed by frameworks like Aurelia or AngularJS) aren't obeserved by the script?