Movatterモバイル変換


[0]ホーム

URL:


MDN Web Docs

MutationRecord

BaselineWidely available

TheMutationRecord is a read-only interface that represents an individual DOM mutation observed by aMutationObserver. It is the object inside the array passed to the callback of aMutationObserver.

Instance properties

MutationRecord.addedNodesRead only

The nodes added by a mutation. Will be an emptyNodeList if no nodes were added.

MutationRecord.attributeNameRead only

The name of the changed attribute as a string, ornull.

MutationRecord.attributeNamespaceRead only

The namespace of the changed attribute as a string, ornull.

MutationRecord.nextSiblingRead only

The next sibling of the added or removed nodes, ornull.

MutationRecord.oldValueRead only

The value depends on theMutationRecord.type:

  • Forattributes, it is the value of the changed attribute before the change.
  • ForcharacterData, it is the data of the changed node before the change.
  • ForchildList, it isnull.
MutationRecord.previousSiblingRead only

The previous sibling of the added or removed nodes, ornull.

MutationRecord.removedNodesRead only

The nodes removed by a mutation. Will be an emptyNodeList if no nodes were removed.

MutationRecord.targetRead only

The node the mutation affected, depending on theMutationRecord.type.

  • Forattributes, it is the element whose attribute changed.
  • ForcharacterData, it is theCharacterData node.
  • ForchildList, it is the node whose children changed.
MutationRecord.typeRead only

A string representing the type of mutation:attributes if the mutation was an attribute mutation,characterData if it was a mutation to aCharacterData node, andchildList if it was a mutation to the tree of nodes.

Specifications

Specification
DOM
# interface-mutationrecord

Browser compatibility

Help improve MDN

Learn how to contribute.

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp