Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
addHandler()
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.