---
schema_version: "1"
id: 0e57cc4127051ea7b3fe402b91af784e548b8d6726a99101d7415e12e25600a1
title: addHandler()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/aura-platform/guides/aura/ref-jsapi/ref-jsapi-component-addhandler.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/ref-jsapi-component-addhandler.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: f80e1ac288e0552a03a1113f8aea266af965361ee14b578ae8dee5cb969970df
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# addHandler()

Deprecated. Use `addEventHandler()` instead.

## Signature

`addHandler(String eventName, Object valueProvider, Object actionExpression, Boolean insert, String phase, Boolean includeFacets)`

## Parameters

**_eventName_:** Type: `String`. The name of the event to handle. For a component event, set this argument to match the name attribute of the `aura:registerEvent` tag. For an application event, set this argument to match the event descriptor, `namespace:eventName`.

**_valueProvider_:** Type: `Object`. The value provider to use for resolving the `actionExpression`.

**_actionExpression_:** Type: `Object`. The expression to use for resolving the handler action against the given `valueProvider`.

**_insert_:** Type: `Boolean`. If `true`, put the handler at the beginning instead of the end of the handler array.

**_phase_:** Type: `String`. Optional. The event bubbling phase for which to add the handler. The default value is `"bubble"`.

**_includeFacets_:** Type: `Boolean`. If `true`, attempts to catch events generated by components transcluded by facets; for example `v.body`.

**See Also**  


-   [addEventHandler()](https://developer.salesforce.com/docs/platform/aura-platform/guide/ref-jsapi-component-addeventhandler.md)

