Mutation Observer delivers records of changes in a selected DOM area. You choose whether to watch children, attributes, or text.
In the demo, adding a node appends a record to the log. Watching too broad a subtree can produce unnecessary records, so narrow the target and options.
When to use
Use it to detect third-party DOM changes or synchronize an editor.