MutationRecord Class

MutationRecord class

A MutationRecord represents an individual DOM mutation. It is the object that is passed to MutationObserver’s MutationCallback.

public class MutationRecord : DOMObject

Properties

NameDescription
getAddedNodes Return the nodes added.
getAttributeName Returns the local name of the changed attribute, and null otherwise.
getAttributeNamespace Returns the package of the changed attribute, and null otherwise.
getNextSibling Return the next sibling of the added or removed nodes, or null.
getOldValue The return value depends on 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.
getPreviousSibling Returns the previous sibling of the added or removed nodes, or null.
getRemovedNodes Return the nodes removed.
getTarget Returns the node the mutation affected, depending on the 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.
getType Returns “attributes” if it 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.

Methods

NameDescription
getPlatformType()This method is used to retrieve the ECMAScript object .

See Also