v3/examples/web-apis/mutation-observer/frontend/index.html
The MutationObserver API provides the ability to watch for changes being made to the DOM tree, including child elements, attributes, and text content.
MutationObserver: checking...
Configure what types of mutations to observe:
Child List Watch for added/removed child nodes
Attributes Watch for attribute changes
Character Data Watch for text content changes
Subtree Include descendant nodes
Start ObserverStop ObserverInactive
0
Child List Mutations
0
Attribute Mutations
0
Character Data Mutations
Reset Statistics
Add, remove, or modify child elements:
Add ChildRemove Last ChildClear All
Initial Element 1
Initial Element 2
Modify element attributes:
Toggle ClassChange StyleSet Data Attribute
Watch my attributes change!
Edit the text content below (click to edit):
Edit this text to trigger characterData mutations. Try typing, deleting, or pasting text!
Perform multiple mutations at once:
5 Mutations10 Mutations25 Mutations
Mutation events will appear here... Clear Log