| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/en-US/docs/Web/API/MutationRecord | [Back] [Original] |
Get to know MDN better
This feature is well established and works across many devices and browser versions. Its been available across browsers since July 2015.
The MutationRecord is a read-only interface that represents an individual DOM mutation observed by a MutationObserver. It is the object inside the array passed to the callback of a MutationObserver.
MutationRecord.addedNodes Read onlyThe nodes added by a mutation. Will be an empty NodeList if no nodes were added.
MutationRecord.attributeName Read onlyThe name of the changed attribute as a string, or null.
MutationRecord.attributeNamespace Read onlyThe namespace of the changed attribute as a string, or null.
MutationRecord.nextSibling Read onlyThe next sibling of the added or removed nodes, or null.
MutationRecord.oldValue Read onlyThe value depends on the MutationRecord.type:
attributes, it is the value of the changed attribute before the change.characterData, it is the data of the changed node before the change.childList, it is null.MutationRecord.previousSibling Read onlyThe previous sibling of the added or removed nodes, or null.
MutationRecord.removedNodes Read onlyThe nodes removed by a mutation. Will be an empty NodeList if no nodes were removed.
MutationRecord.target Read onlyThe node the mutation affected, depending on the MutationRecord.type.
attributes, it is the element whose attribute changed.characterData, it is the CharacterData node.childList, it is the node whose children changed.MutationRecord.type Read onlyA string representing the type of mutation: attributes if the mutation was an attribute mutation, characterData if it was a mutation to a CharacterData node, and childList if it was a mutation to the tree of nodes.
| Specification |
|---|
| DOM # interface-mutationrecord |
This page was last modified on Jul 24, 2024 by MDN contributors.
MutationRecordAbortControllerAbortSignalAbstractRangeAttrCDATASectionCharacterDataCommentCustomEventDOMErrorDOMExceptionDOMImplementationDOMParserDOMTokenListDocumentDocumentFragmentDocumentTypeElementEventEventTargetHTMLCollectionMutationObserverNamedNodeMapNodeNodeIteratorNodeListProcessingInstructionQuotaExceededErrorRangeShadowRootStaticRangeTextTreeWalkerXMLDocumentXPathEvaluatorXPathExpressionXPathResultXSLTProcessorYour blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |