Javascript Reference
Categories: event

javascript event eventPhase

@March 15, 2008, 1:22 a.m.
eventPhaseFirefox/Netscape/NN 6 IE n/a Chrome/Safari/DOM 2

Read-only

Returns an integer conveying whether the event listener is processing the event while in the capture phase, at the event target, or in the bubbling phase. W3C DOM event objects also implement plain-language constants corresponding to the three values.

 
Example
 
if (evt.eventPhase == evt.AT_TARGET) {
    // process event listener from the event target
}
 
Value

Integer value from the following table.

 
ValueConstant
1eventObjectReference.CAPTURING_PHASE
2eventObjectReference.AT_TARGET
3eventObjectReference.BUBBLING_PHASE
 
Default

2


Powered by Linode.