Javascript Reference
Categories: event

javascript event attrChange

@May 8, 2008, 2:53 p.m.
attrChange Firefox/Netscape/NN 6 IE n/a Chrome/Safari/DOM 2

 

Read-only

Returns an integer code corresponding to the type of change made to an Attr node as the result of a DOMAttrModified event type of W3C DOM mutation event. Every mutation event object has three constants that also correspond to the integer values, which you can use to make more verbose, but easier-to-read script comparisons for DOMAttrModified event processing. The values and constants are shown in the following table.

 
Value Constant Description
1 evtObj.MODIFICATION Changed value of existing Attr node
2 evtObj.ADDITION The Attr node was added to the document tree
3 evtObj.REMOVAL The Attr node was removed from the document tree
 
Example
 
if (evt.attrChange == evt.MODIFICATION) {
  // do post-processing of attribute value change
}
 
Value

Integer value: 1 | 2 | 3.

 
Default

None.


Powered by Linode.