com.aspose.html.dom.mutations

Class MutationRecord

  • java.lang.Object
    • com.aspose.html.dom.mutations.MutationRecord


  • 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.

    • Constructor Summary

      Constructors 
      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.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ATTRIBUTE_MUTATION

        public static final java.lang.String ATTRIBUTE_MUTATION
        See Also:
        Constant Field Values
      • CHARACTER_DATA_MUTATION

        public static final java.lang.String CHARACTER_DATA_MUTATION
        See Also:
        Constant Field Values
      • EMPTY_NODES

        public static final com.aspose.ms.System.Collections.Generic.IGenericList<Node> EMPTY_NODES
    • Constructor Detail

      • MutationRecord

        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.

        Parameters:
        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.
    • Method Detail

      • getType

        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.
      • setType

        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.
      • getTarget

        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.
      • setTarget

        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.
      • getAddedNodes

        public com.aspose.ms.System.Collections.Generic.IGenericList<Node> getAddedNodes()

        Return the nodes added.

        Value: The added nodes.
      • setAddedNodes

        public void setAddedNodes(com.aspose.ms.System.Collections.Generic.IGenericList<Node> value)

        Return the nodes added.

        Value: The added nodes.
      • getRemovedNodes

        public com.aspose.ms.System.Collections.Generic.IGenericList<Node> getRemovedNodes()

        Return the nodes removed.

        Value: The removed nodes.
      • setRemovedNodes

        public void setRemovedNodes(com.aspose.ms.System.Collections.Generic.IGenericList<Node> value)

        Return the nodes removed.

        Value: The removed nodes.
      • getPreviousSibling

        public Node getPreviousSibling()

        Returns the previous sibling of the added or removed nodes, or null.

        Value: The previous sibling.
      • setPreviousSibling

        public void setPreviousSibling(Node value)

        Returns the previous sibling of the added or removed nodes, or null.

        Value: The previous sibling.
      • getNextSibling

        public Node getNextSibling()

        Return the next sibling of the added or removed nodes, or null.

        Value: The next sibling.
      • setNextSibling

        public void setNextSibling(Node value)

        Return the next sibling of the added or removed nodes, or null.

        Value: The next sibling.
      • getAttributeName

        public java.lang.String getAttributeName()

        Returns the local name of the changed attribute, and null otherwise.

        Value: The name of the attribute.
      • setAttributeName

        public void setAttributeName(java.lang.String value)

        Returns the local name of the changed attribute, and null otherwise.

        Value: The name of the attribute.
      • getAttributeNamespace

        public java.lang.String getAttributeNamespace()

        Returns the namespace of the changed attribute, and null otherwise.

        Value: The attribute namespace.
      • setAttributeNamespace

        public void setAttributeNamespace(java.lang.String value)

        Returns the namespace of the changed attribute, and null otherwise.

        Value: The attribute namespace.
      • getOldValue

        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.
      • setOldValue

        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.