Package org.pepstock.charba.client.dom
Class MutationRecord
- java.lang.Object
-
- org.pepstock.charba.client.dom.MutationRecord
-
@JsType(isNative=true, namespace="<global>") public final class MutationRecord extends ObjectRepresents an individual DOM mutation. It is the object that is passed toMutationObserver.MutationObserverCallback's callback.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<BaseHtmlElement>getAddedElements()Returns the elements added.
Will be an empty element list if no elements were added.BaseNodegetNextSibling()Returns the next sibling of the added or removed nodes, or null.BaseNodegetPreviousSibling()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.BaseNodegetTarget()Returns the node the mutation affected, depending on theMutationType.MutationTypegetType()ReturnsMutationType.ATTRIBUTESif the mutation was an attribute mutation,MutationType.CHARACTER_DATAif it was a mutation to a CharacterData node, andMutationType.CHILD_LISTif it was a mutation to the tree of nodes.
-
-
-
Method Detail
-
getAddedElements
@JsOverlay public List<BaseHtmlElement> getAddedElements()
Returns the elements added.
Will be an empty element list if no elements were added.- Returns:
- the elements added
-
getNextSibling
@JsProperty public BaseNode getNextSibling()
Returns the next sibling of the added or removed nodes, or null.- Returns:
- the next sibling of the added or removed nodes, or null
-
getPreviousSibling
@JsProperty public BaseNode getPreviousSibling()
Returns the previous sibling of the added or removed nodes, or null.- Returns:
- the previous sibling of the added or removed nodes, or null
-
getRemovedElements
@JsOverlay public List<BaseHtmlElement> getRemovedElements()
Returns the elements removed.
Will be an empty element list if no elements were removed.- Returns:
- the elements removed
-
getTarget
@JsProperty public BaseNode getTarget()
Returns the node the mutation affected, depending on theMutationType. ForMutationType.ATTRIBUTES, it is the element whose attribute changed. ForMutationType.CHARACTER_DATA, it is the character data node. ForMutationType.CHILD_LIST, it is the node whose children changed.- Returns:
- the node the mutation affected
-
getType
@JsOverlay public MutationType getType()
ReturnsMutationType.ATTRIBUTESif the mutation was an attribute mutation,MutationType.CHARACTER_DATAif it was a mutation to a CharacterData node, andMutationType.CHILD_LISTif it was a mutation to the tree of nodes.- Returns:
- the type of mutation record
-
-