public class MutationRecord
extends java.lang.Object
A MutationRecord represents an individual DOM mutation. It is the object that is passed to MutationObserver
's MutationCallback
.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATTRIBUTE_MUTATION |
static java.lang.String |
CHARACTER_DATA_MUTATION |
static java.lang.String |
CHILD_LIST |
static com.aspose.ms.System.Collections.Generic.IGenericList<Node> |
EMPTY_NODES |
Constructor and Description |
---|
MutationRecord(java.lang.String type,
Node target,
com.aspose.ms.System.Collections.Generic.IGenericList<Node> addedNodes,
com.aspose.ms.System.Collections.Generic.IGenericList<Node> removedNodes,
Node previousSibling,
Node nextSibling,
java.lang.String attributeName,
java.lang.String attributeNamespace,
java.lang.String oldValue)
Initializes a new instance of the
MutationRecord class. |
Modifier and Type | Method and Description |
---|---|
com.aspose.ms.System.Collections.Generic.IGenericList<Node> |
getAddedNodes()
Return the nodes added.
|
java.lang.String |
getAttributeName()
Returns the local name of the changed attribute, and null otherwise.
|
java.lang.String |
getAttributeNamespace()
Returns the namespace of the changed attribute, and null otherwise.
|
Node |
getNextSibling()
Return the next sibling of the added or removed nodes, or null.
|
java.lang.String |
getOldValue()
The return value depends on type.
|
Node |
getPreviousSibling()
Returns the previous sibling of the added or removed nodes, or null.
|
com.aspose.ms.System.Collections.Generic.IGenericList<Node> |
getRemovedNodes()
Return the nodes removed.
|
Node |
getTarget()
Returns the node the mutation affected, depending on the type.
|
java.lang.String |
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.
|
void |
setAddedNodes(com.aspose.ms.System.Collections.Generic.IGenericList<Node> value)
Return the nodes added.
|
void |
setAttributeName(java.lang.String value)
Returns the local name of the changed attribute, and null otherwise.
|
void |
setAttributeNamespace(java.lang.String value)
Returns the namespace of the changed attribute, and null otherwise.
|
void |
setNextSibling(Node value)
Return the next sibling of the added or removed nodes, or null.
|
void |
setOldValue(java.lang.String value)
The return value depends on type.
|
void |
setPreviousSibling(Node value)
Returns the previous sibling of the added or removed nodes, or null.
|
void |
setRemovedNodes(com.aspose.ms.System.Collections.Generic.IGenericList<Node> value)
Return the nodes removed.
|
void |
setTarget(Node value)
Returns the node the mutation affected, depending on the type.
|
void |
setType(java.lang.String value)
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.
|
public static final java.lang.String ATTRIBUTE_MUTATION
public static final java.lang.String CHARACTER_DATA_MUTATION
public static final java.lang.String CHILD_LIST
public static final com.aspose.ms.System.Collections.Generic.IGenericList<Node> EMPTY_NODES
public MutationRecord(java.lang.String type, Node target, com.aspose.ms.System.Collections.Generic.IGenericList<Node> addedNodes, com.aspose.ms.System.Collections.Generic.IGenericList<Node> removedNodes, Node previousSibling, Node nextSibling, java.lang.String attributeName, java.lang.String attributeNamespace, java.lang.String oldValue)
Initializes a new instance of the MutationRecord
class.
type
- The type.target
- The target.addedNodes
- The added nodes.removedNodes
- The removed nodes.previousSibling
- The previous sibling.nextSibling
- The next sibling.attributeName
- Name of the attribute.attributeNamespace
- The attribute namespace.oldValue
- The old value.public java.lang.String 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.
Value: The type.public void setType(java.lang.String value)
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.
Value: The type.public Node 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.
Value: The target.public void setTarget(Node value)
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.
Value: The target.public com.aspose.ms.System.Collections.Generic.IGenericList<Node> getAddedNodes()
Return the nodes added.
Value: The added nodes.public void setAddedNodes(com.aspose.ms.System.Collections.Generic.IGenericList<Node> value)
Return the nodes added.
Value: The added nodes.public com.aspose.ms.System.Collections.Generic.IGenericList<Node> getRemovedNodes()
Return the nodes removed.
Value: The removed nodes.public void setRemovedNodes(com.aspose.ms.System.Collections.Generic.IGenericList<Node> value)
Return the nodes removed.
Value: The removed nodes.public Node getPreviousSibling()
Returns the previous sibling of the added or removed nodes, or null.
Value: The previous sibling.public void setPreviousSibling(Node value)
Returns the previous sibling of the added or removed nodes, or null.
Value: The previous sibling.public Node getNextSibling()
Return the next sibling of the added or removed nodes, or null.
Value: The next sibling.public void setNextSibling(Node value)
Return the next sibling of the added or removed nodes, or null.
Value: The next sibling.public java.lang.String getAttributeName()
Returns the local name of the changed attribute, and null otherwise.
Value: The name of the attribute.public void setAttributeName(java.lang.String value)
Returns the local name of the changed attribute, and null otherwise.
Value: The name of the attribute.public java.lang.String getAttributeNamespace()
Returns the namespace of the changed attribute, and null otherwise.
Value: The attribute namespace.public void setAttributeNamespace(java.lang.String value)
Returns the namespace of the changed attribute, and null otherwise.
Value: The attribute namespace.public java.lang.String 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.
Value: The old value.public void setOldValue(java.lang.String value)
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.
Value: The old value.