MutationRecord
MutationRecord is the data structure used by the MutationObserver API to describe a single DOM mutation. When a MutationObserver detects changes in an observed subtree, its callback receives an array of MutationRecord objects, each representing one mutation event. The records provide details about what changed, where it changed, and, when applicable, what the previous value was.
Each MutationRecord includes a type field that indicates the kind of mutation. The type is one of
The oldValue field holds the previous value of the mutated attribute or character data, but only if
MutationRecord objects are delivered in batch to the callback, allowing developers to examine each change and