Package org.w3c.dom.events
Interface MutationEvent
-
- All Superinterfaces:
Event
- All Known Subinterfaces:
MutationNameEvent
- All Known Implementing Classes:
DOMMutationEvent,DOMMutationNameEvent
public interface MutationEvent extends Event
TheMutationEventinterface provides specific contextual information associated with Mutation events.To create an instance of the
MutationEventinterface, use theDocumentEvent.createEvent("MutationEvent")method call.See also the Document Object Model (DOM) Level 3 Events Specification .
- Since:
- DOM Level 2
-
-
Field Summary
Fields Modifier and Type Field Description static shortADDITIONTheAttrwas just added.static shortMODIFICATIONTheAttrwas modified in place.static shortREMOVALTheAttrwas just removed.-
Fields inherited from interface org.w3c.dom.events.Event
AT_TARGET, BUBBLING_PHASE, CAPTURING_PHASE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description shortgetAttrChange()attrChangeindicates the type of change which triggered the DOMAttrModified event.java.lang.StringgetAttrName()attrNameindicates the name of the changedAttrnode in a DOMAttrModified event.java.lang.StringgetNewValue()newValueindicates the new value of theAttrnode in DOMAttrModified events, and of theCharacterDatanode in DOMCharacterDataModified events.java.lang.StringgetPrevValue()prevValueindicates the previous value of theAttrnode in DOMAttrModified events, and of theCharacterDatanode in DOMCharacterDataModified events.org.w3c.dom.NodegetRelatedNode()relatedNodeis used to identify a secondary node related to a mutation event.voidinitMutationEvent(java.lang.String typeArg, boolean canBubbleArg, boolean cancelableArg, org.w3c.dom.Node relatedNodeArg, java.lang.String prevValueArg, java.lang.String newValueArg, java.lang.String attrNameArg, short attrChangeArg)TheinitMutationEventmethod is used to initialize the value of aMutationEventobject and has the same behavior asEvent.initEvent().voidinitMutationEventNS(java.lang.String namespaceURI, java.lang.String typeArg, boolean canBubbleArg, boolean cancelableArg, org.w3c.dom.Node relatedNodeArg, java.lang.String prevValueArg, java.lang.String newValueArg, java.lang.String attrNameArg, short attrChangeArg)TheinitMutationEventNSmethod is used to initialize the value of aMutationEventobject and has the same behavior asEvent.initEventNS().-
Methods inherited from interface org.w3c.dom.events.Event
getBubbles, getCancelable, getCurrentTarget, getDefaultPrevented, getEventPhase, getNamespaceURI, getTarget, getTimeStamp, getType, initEvent, initEventNS, preventDefault, stopImmediatePropagation, stopPropagation
-
-
-
-
Field Detail
-
MODIFICATION
static final short MODIFICATION
TheAttrwas modified in place.- See Also:
- Constant Field Values
-
ADDITION
static final short ADDITION
TheAttrwas just added.- See Also:
- Constant Field Values
-
REMOVAL
static final short REMOVAL
TheAttrwas just removed.- See Also:
- Constant Field Values
-
-
Method Detail
-
getRelatedNode
org.w3c.dom.Node 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.
-
getPrevValue
java.lang.String getPrevValue()
prevValueindicates the previous value of theAttrnode in DOMAttrModified events, and of theCharacterDatanode in DOMCharacterDataModified events.
-
getNewValue
java.lang.String getNewValue()
newValueindicates the new value of theAttrnode in DOMAttrModified events, and of theCharacterDatanode in DOMCharacterDataModified events.
-
getAttrName
java.lang.String getAttrName()
attrNameindicates the name of the changedAttrnode in a DOMAttrModified event.
-
getAttrChange
short getAttrChange()
attrChangeindicates the type of change which triggered the DOMAttrModified event. The values can beMODIFICATION,ADDITION, orREMOVAL.
-
initMutationEvent
void initMutationEvent(java.lang.String typeArg, boolean canBubbleArg, boolean cancelableArg, org.w3c.dom.Node relatedNodeArg, java.lang.String prevValueArg, java.lang.String newValueArg, java.lang.String attrNameArg, short attrChangeArg)TheinitMutationEventmethod is used to initialize the value of aMutationEventobject and has the same behavior asEvent.initEvent().- Parameters:
typeArg- Refer to theEvent.initEvent()method for a description of this parameter.canBubbleArg- Refer to theEvent.initEvent()method for a description of this parameter.cancelableArg- Refer to theEvent.initEvent()method for a description of this parameter.relatedNodeArg- SpecifiesMutationEvent.relatedNode.prevValueArg- SpecifiesMutationEvent.prevValue. This value may be null.newValueArg- SpecifiesMutationEvent.newValue. This value may be null.attrNameArg- SpecifiesMutationEvent.attrname. This value may be null.attrChangeArg- SpecifiesMutationEvent.attrChange. This value may be null.
-
initMutationEventNS
void initMutationEventNS(java.lang.String namespaceURI, java.lang.String typeArg, boolean canBubbleArg, boolean cancelableArg, org.w3c.dom.Node relatedNodeArg, java.lang.String prevValueArg, java.lang.String newValueArg, java.lang.String attrNameArg, short attrChangeArg)TheinitMutationEventNSmethod is used to initialize the value of aMutationEventobject and has the same behavior asEvent.initEventNS().- Parameters:
namespaceURI- Refer to theEvent.initEventNS()method for a description of this parameter.typeArg- Refer to theEvent.initEventNS()method for a description of this parameter.canBubbleArg- Refer to theEvent.initEventNS()method for a description of this parameter.cancelableArg- Refer to theEvent.initEventNS()method for a description of this parameter.relatedNodeArg- Refer to theMutationEvent.initMutationEvent()method for a description of this parameter.prevValueArg- Refer to theMutationEvent.initMutationEvent()method for a description of this parameter.newValueArg- Refer to theMutationEvent.initMutationEvent()method for a description of this parameter.attrNameArg- Refer to theMutationEvent.initMutationEvent()method for a description of this parameter.attrChangeArg- Refer to theMutationEvent.initMutationEvent()method for a description of this parameter.- Since:
- DOM Level 3
-
-