Class MutationRecord
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
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.
[Value("MutationRecord")]
public class MutationRecord
- Inheritance
-
MutationRecord
- Inherited Members
Remarks
Constructors
MutationRecord()
public MutationRecord()
Properties
AddedNodes
The MutationRecord read-only property addedNodes is a NodeList of nodes added to a target node by a mutation observed with a MutationObserver.
[Value("addedNodes")]
public NodeList AddedNodes { get; }
Property Value
- NodeList
A NodeList containing the nodes added to the target of the mutation observed by the MutationObserver.
Remarks
AttributeName
The MutationRecord read-only property attributeName contains the name of a changed attribute belonging to a node that is observed by a MutationObserver.
[Value("attributeName")]
public string? AttributeName { get; }
Property Value
- string
If the record's
typeisattributes, this is a string representing the name of the mutated attribute of the mutation target.If the record'stypeis notattributes, this isnull.
Remarks
AttributeNamespace
The MutationRecord read-only property attributeNamespace is the namespace of the mutated attribute in the MutationRecord observed by a MutationObserver.
[Value("attributeNamespace")]
public string? AttributeNamespace { get; }
Property Value
- string
If the record's
typeisattributes, the property is a string representing the namespace of the mutated attribute of the mutation target. The value isnullotherwise.
Remarks
NextSibling
The MutationRecord read-only property nextSibling is the next sibling of an added or removed child node of the target of a MutationObserver.
[Value("nextSibling")]
public Node? NextSibling { get; }
Property Value
- Node
If a node is added to or removed from the
targetof a MutationObserver, the value is the Node that is the next sibling of the added or removed node: that is, the node immediately following this one in the parent's ChildNodes list.The value isnullif there are no added or removed nodes, or if the node is the last child of its parent.
Remarks
OldValue
The MutationRecord read-only property oldValue contains the character data or attribute value of an observed node before it was changed.
[Value("oldValue")]
public string? OldValue { get; }
Property Value
- string
A string representing the old value of an attribute which has been changed, if:A string representing the old value of a CharacterData node that has been changed, if:Otherwise this property is
null.
Remarks
PreviousSibling
The MutationRecord read-only property previousSibling is the previous sibling of an added or removed child node of the target of a MutationObserver.
[Value("previousSibling")]
public Node? PreviousSibling { get; }
Property Value
- Node
If a node is added to or removed from the
targetof a MutationObserver, the value is the Node that is the previous sibling of the added or removed node: that is, the node immediately before this one in the parent's ChildNodes list.The value isnullif there are no added or removed nodes, or if the node is the first child of its parent.
Remarks
RemovedNodes
The MutationRecord read-only property removedNodes is a NodeList of nodes removed from a target node by a mutation observed with a MutationObserver.
[Value("removedNodes")]
public NodeList RemovedNodes { get; }
Property Value
- NodeList
A NodeList containing the nodes removed from the target of the mutation observed by the MutationObserver.
Remarks
Target
The MutationRecord read-only property target is the target (i.e., the mutated/changed node) of a mutation observed with a MutationObserver.
[Value("target")]
public Node Target { get; }
Property Value
Remarks
Type
The MutationRecord read-only property type is the type of the MutationRecord observed by a MutationObserver.
[Value("type")]
public string Type { get; }
Property Value
- string
The property is set to the type of the mutation as a string. The value can be one of the following: