org.w3c.dom.events
Interface MutationEvent
- public interface MutationEvent
- extends Event
The MutationEvent interface provides specific contextual
information associated with Mutation events.
See also the Document Object
Model (DOM) Level 2 Events Specification.
- Since:
- DOM Level 2
 
 
| Field Summary | 
| static short | ADDITIONThe
 Attrwas just added. | 
| static short | MODIFICATIONThe
 Attrwas modified in place. | 
| static short | REMOVALThe
 Attrwas just removed. | 
  
  
 
  
| Method Summary | 
|  short | getAttrChange()
 attrChangeindicates the type of change which triggered the DOMAttrModified event. | 
|  java.lang.String | getAttrName()
 attrNameindicates the name of the changedAttrnode in a DOMAttrModified
event. | 
|  java.lang.String | getNewValue()
 newValueindicates the new value of theAttrnode in DOMAttrModified
events, and of theCharacterDatanode in DOMCharDataModified
events. | 
|  java.lang.String | getPrevValue()
 prevValueindicates the previous value of theAttrnode in DOMAttrModified
events, and of theCharacterDatanode in DOMCharDataModified
events. | 
|  Node | getRelatedNode()
 relatedNodeis used to identify a secondary node related to a mutation event. | 
|  void | 
initMutationEvent(java.lang.String typeArg,
boolean canBubbleArg, boolean cancelableArg, Node relatedNodeArg,
java.lang.String prevValueArg, java.lang.String newValueArg,
java.lang.String attrNameArg, short attrChangeArg)The
 initMutationEventmethod is used to initialize the value of aMutationEventcreated through theDocumentEventinterface. | 
  
  
 
MODIFICATION
public static final short MODIFICATION
- The Attrwas modified in place.
ADDITION
public static final short ADDITION
- The Attrwas just added.
REMOVAL
public static final short REMOVAL
- The Attrwas just removed.
getRelatedNode
public 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, the- relatedNodeis the
changed parent. If an event is instead dispatched to a subtree indicating a
node was changed within it, the- relatedNodeis the changed node.
In the case of the DOMAttrModified event it indicates the- Attrnode which was modified, added, or removed.
getPrevValue
public java.lang.String getPrevValue()
- prevValueindicates the previous value of the- Attrnode in DOMAttrModified events, and of the- CharacterDatanode in DOMCharDataModified events.
getNewValue
public java.lang.String getNewValue()
- newValueindicates the new value of the- Attrnode
in DOMAttrModified events, and of the- CharacterDatanode in
DOMCharDataModified events.
getAttrName
public java.lang.String getAttrName()
- attrNameindicates the name of the changed- Attrnode in a DOMAttrModified event.
getAttrChange
public short getAttrChange()
- attrChangeindicates the type of change which triggered the
DOMAttrModified event. The values can be- MODIFICATION,- ADDITION, or- REMOVAL.
initMutationEvent
public void initMutationEvent(java.lang.String typeArg,
                              boolean canBubbleArg,
                              boolean cancelableArg,
                              Node relatedNodeArg,
                              java.lang.String prevValueArg,
                              java.lang.String newValueArg,
                              java.lang.String attrNameArg,
                              short attrChangeArg)
- The initMutationEventmethod 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
 
 
Copyright
© 2000 W3C® (MIT, INRIA,
Keio), All Rights Reserved. W3C liability,
trademark,
document
useand software
licensing rules apply. Your interactions with this site are in accordance
with our public
and Member
privacy statements.