In this example, clicking the Toggle class / data button will toggle a 'modded' class on our div
element, and switch the data-config
attribute between two values. However, in this case, we've added an attributeFilter
to only observe the class
attribute. Notice that we don't have a mutation record for the data-config
attribute.
Open the developer console to examine changes between states.