Firefox Tomorrow

web api interface

MutationRecord

View on MDN ↗

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.

Instance properties

  • addedNodes Read only
    • : The nodes added by a mutation. Will be an empty NodeList if no nodes were added.
  • attributeName Read only
    • : The name of the changed attribute as a string, or null.
  • attributeNamespace Read only
    • : The namespace of the changed attribute as a string, or null.
  • nextSibling Read only
    • : The next sibling of the added or removed nodes, or null.
  • oldValue Read only
    • : The value depends on the type:
      • For attributes, it is the value of the changed attribute before the change.
      • For characterData, it is the data of the changed node before the change.
      • For childList, it is null.
  • previousSibling Read only
    • : The previous sibling of the added or removed nodes, or null.
  • removedNodes Read only
    • : The nodes removed by a mutation. Will be an empty NodeList if no nodes were removed.
  • target Read only
    • : The node the mutation affected, depending on the MutationRecord.type.
      • For attributes, it is the element whose attribute changed.
      • For characterData, it is the CharacterData node.
      • For childList, it is the node whose children changed.
  • type Read only
    • : A 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.

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.