---
schema_version: "1"
id: c4618e65a0203d3505c27ac4472e1fe5eb71950ec0100cea4a1975d02d9a073e
title: Handling Application Events
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/aura-platform/guides/aura/events/events-application-handling.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/events-application-handling.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 09d1ed7781ff655babb5a4a220a2be2d0d264969f2dcd41544d04de3d89a50dc
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# Handling Application Events

Use `<aura:handler>` in the markup of the handler component.

For example:

```nolang
<aura:handler event="c:appEvent" action="{!c.handleApplicationEvent}"/>
```

The `event` attribute specifies the event being handled. The format is `namespace:eventName`.

The `action` attribute of `<aura:handler>` sets the client-side controller action to handle the event.

**note:** The handler for an application event won’t work if you set the `name` attribute in `<aura:handler>`. Use the `name` attribute only when you’re handling component events.

In this example, when the event is fired, the `handleApplicationEvent` client-side controller action is called.

## Event Handling Phases

The framework allows you to handle the event in different phases. These phases give you flexibility for how to best process the event for your application.

Application event handlers are associated with the default phase. To add a handler for the capture or bubble phases instead, use the `phase` attribute.

## Get the Source of an Event

In the client-side controller action for an `<aura:handler>` tag, use `evt.getSource()` to find out which component fired the event, where `evt` is a reference to the event. To retrieve the source element, use `evt.getSource().getElement()`.

-   **[Handling Bubbled or Captured Application Events](https://developer.salesforce.com/docs/platform/aura-platform/guide/events-application-handling-phases.md)**  


    Event propagation rules determine which components in the containment hierarchy can handle events by default in the bubble or capture phases. Learn about the rules and how to handle events in the bubble or capture phases.


**See Also**  


-   [Handling Component Events](https://developer.salesforce.com/docs/platform/aura-platform/guide/events-component-handling-intro.md)

