# .eventPhase

> The `.eventPhase` JS browser API property of an `Event` object indicates which phase of the event flow is currently being evaluated.

## What does event.eventPhase return in JavaScript?

The browser API property that indicates the current phase of event propagation, returning an integer. Possible phases include no processing, capturing phase, target phase and bubbling phase.

- Topic: Event
- Type: property
- Browser support: Chrome 1+, Chrome Android 18+, Edge 12+, Firefox 1.5+, Firefox Android 4+, Safari 1+, Safari iOS 1+

## Example

```js
parent.addEventListener('click', (e) => {
  if (e.eventPhase === Event.BUBBLING_PHASE) log('bubbling');
});
```

`eventPhase` returns the current propagation phase, and `Event.BUBBLING_PHASE` ('3') matches a click bubbling up from a child.

## Common mistakes

- Reading `eventPhase` after the handler finished and getting 0.

## Key points

- Code compares `eventPhase` to constants like `Event.CAPTURING_PHASE`, `Event.AT_TARGET` and `Event.BUBBLING_PHASE`, not bare numbers.
- Listeners that must run before target handlers are added with `{ capture: true }`.

## Interview questions

### What are the possible values of eventPhase?

0 is `NONE`, 1 is `CAPTURING_PHASE`, 2 is `AT_TARGET` and 3 is `BUBBLING_PHASE`.

### Why is eventPhase 0?

0 means `NONE`: the event is not being dispatched, for example when read after the handler returned or before `dispatchEvent()`.

## Related cards

- [Event Bubbling](https://wonderium.dev/js/event-bubbling.md)
- [.bubbles](https://wonderium.dev/js/event-bubbles.md)
- [Event Model](https://wonderium.dev/js/event-model.md)
- [Event](https://wonderium.dev/js/event.md)
- [.addEventListener()](https://wonderium.dev/js/add-event-listener.md)

---

- Level: [JavaScript](https://wonderium.dev/js.md)
- HTML version: https://wonderium.dev/js/event-event-phase
- Last updated: 2026-11-25
