eventPhase property

This topic has not yet been rated - Rate this topic

Gets the event phase that is being evaluated.

Document Object Model (DOM) Level 3 Events Specification, Section 4.1

Syntax

JavaScript

p = object.eventPhase

Property values

Type: Number

CAPTURING_PHASE (1)

The event is in the capturing phase.

AT_TARGET (2)

The event is being evaluated at the target element.

BUBBLING_PHASE (3)

The event is in the bubbling phase.

Standards information

Remarks

During the capturing phase, events are dispatched to parent elements before objects that are lower in the hierarchy. Next, during the bubbling phase, events are dispatched to target elements followed by parent objects. The event phase is AT_TARGET when the element that receives the event (target) is the same element as the element that is processing the event (currentTarget). The target element receives both capture and bubble events if both are registered.

Examples

The following code example demonstrates how to determine the phase of an event by using the eventPhase property.

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/ie9_event_phases.htm

See also

SVGZoomEvent
BeforeUnloadEvent
CompositionEvent
CustomEvent
Event
DragEvent
FocusEvent
KeyboardEvent
MessageEvent
MouseEvent
MutationEvent
StorageEvent
TextEvent
UIEvent

 

 

Build date: 11/29/2012

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.