- All Superinterfaces:
- Event
The 
MutationEvent interface provides specific contextual
 information associated with Mutation events.
 See also the Document Object Model (DOM) Level 2 Events Specification.
- Since:
- 1.5, DOM Level 2
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final shortTheAttrwas just added.static final shortTheAttrwas modified in place.static final shortTheAttrwas just removed.Fields declared in interface org.w3c.dom.events.EventAT_TARGET, BUBBLING_PHASE, CAPTURING_PHASE
- 
Method SummaryModifier and TypeMethodDescriptionshortattrChangeindicates the type of change which triggered the DOMAttrModified event.attrNameindicates the name of the changedAttrnode in a DOMAttrModified event.newValueindicates the new value of theAttrnode in DOMAttrModified events, and of theCharacterDatanode in DOMCharacterDataModified events.prevValueindicates the previous value of theAttrnode in DOMAttrModified events, and of theCharacterDatanode in DOMCharacterDataModified events.relatedNodeis used to identify a secondary node related to a mutation event.voidinitMutationEvent(String typeArg, boolean canBubbleArg, boolean cancelableArg, Node relatedNodeArg, String prevValueArg, String newValueArg, String attrNameArg, short attrChangeArg) TheinitMutationEventmethod is used to initialize the value of aMutationEventcreated through theDocumentEventinterface.Methods declared in interface org.w3c.dom.events.EventgetBubbles, getCancelable, getCurrentTarget, getEventPhase, getTarget, getTimeStamp, getType, initEvent, preventDefault, stopPropagation
- 
Field Details- 
MODIFICATIONstatic final short MODIFICATIONTheAttrwas modified in place.- See Also:
 
- 
ADDITIONstatic final short ADDITIONTheAttrwas just added.- See Also:
 
- 
REMOVALstatic final short REMOVALTheAttrwas just removed.- See Also:
 
 
- 
- 
Method Details- 
getRelatedNodeNode getRelatedNode()relatedNodeis used to identify a secondary node related to a mutation event. For example, if a mutation event is dispatched to a node indicating that its parent has changed, therelatedNodeis the changed parent. If an event is instead dispatched to a subtree indicating a node was changed within it, therelatedNodeis the changed node. In the case of the DOMAttrModified event it indicates theAttrnode which was modified, added, or removed.
- 
getPrevValueString getPrevValue()prevValueindicates the previous value of theAttrnode in DOMAttrModified events, and of theCharacterDatanode in DOMCharacterDataModified events.
- 
getNewValueString getNewValue()newValueindicates the new value of theAttrnode in DOMAttrModified events, and of theCharacterDatanode in DOMCharacterDataModified events.
- 
getAttrNameString getAttrName()attrNameindicates the name of the changedAttrnode in a DOMAttrModified event.
- 
getAttrChangeshort getAttrChange()attrChangeindicates the type of change which triggered the DOMAttrModified event. The values can beMODIFICATION,ADDITION, orREMOVAL.
- 
initMutationEventvoid initMutationEvent(String typeArg, boolean canBubbleArg, boolean cancelableArg, Node relatedNodeArg, String prevValueArg, String newValueArg, String attrNameArg, short attrChangeArg) TheinitMutationEventmethod is used to initialize the value of aMutationEventcreated through theDocumentEventinterface. This method may only be called before theMutationEventhas been dispatched via thedispatchEventmethod, though it may be called multiple times during that phase if necessary. If called multiple times, the final invocation takes precedence.- Parameters:
- typeArg- Specifies the event type.
- canBubbleArg- Specifies whether or not the event can bubble.
- cancelableArg- Specifies whether or not the event's default action can be prevented.
- relatedNodeArg- Specifies the- Event's related Node.
- prevValueArg- Specifies the- Event's- prevValueattribute. This value may be null.
- newValueArg- Specifies the- Event's- newValueattribute. This value may be null.
- attrNameArg- Specifies the- Event's- attrNameattribute. This value may be null.
- attrChangeArg- Specifies the- Event's- attrChangeattribute
 
 
-