@JsType(isNative=true, namespace="<global>") public final class MutationRecord extends Object
MutationObserver.MutationObserverCallback
's callback.Modifier and Type | Method and Description |
---|---|
List<BaseHtmlElement> |
getAddedElements()
Returns the elements added.
Will be an empty element list if no elements were added. |
BaseNode |
getNextSibling()
Returns the next sibling of the added or removed nodes, or null.
|
BaseNode |
getPreviousSibling()
Returns the previous sibling of the added or removed nodes, or null.
|
List<BaseHtmlElement> |
getRemovedElements()
Returns the elements removed.
Will be an empty element list if no elements were removed. |
BaseNode |
getTarget()
Returns the node the mutation affected, depending on the
MutationType . |
MutationType |
getType()
Returns
MutationType.ATTRIBUTES if the mutation was an attribute mutation, MutationType.CHARACTER_DATA if it was a mutation to a CharacterData node, and
MutationType.CHILD_LIST if it was a mutation to the tree of nodes. |
@JsOverlay public List<BaseHtmlElement> getAddedElements()
@JsProperty public BaseNode getNextSibling()
@JsProperty public BaseNode getPreviousSibling()
@JsOverlay public List<BaseHtmlElement> getRemovedElements()
@JsProperty public BaseNode getTarget()
MutationType
. For MutationType.ATTRIBUTES
, it is the element whose attribute changed. For
MutationType.CHARACTER_DATA
, it is the character data node. For MutationType.CHILD_LIST
, it is the node whose children changed.@JsOverlay public MutationType getType()
MutationType.ATTRIBUTES
if the mutation was an attribute mutation, MutationType.CHARACTER_DATA
if it was a mutation to a CharacterData node, and
MutationType.CHILD_LIST
if it was a mutation to the tree of nodes.