---
schema_version: "1"
id: 421b5ca7a3b4a31d20c53b169f34927d81045b1129ab9769b0e49ef456346215
title: getEvent()
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-getevent.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/ref-jsapi-component-getevent.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: ccae41e9d9a9ae37f502af745e0a0bf27f086f37636475e10a7c1fb5268e601d
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# getEvent()

Returns a new event instance of the named component event.

## Signature

`getEvent(String name)`

## Parameters

**_name_:** Type: `String`. The name of the event.

## Sample Code

```javascript
// evtName matches the name attribute in aura:registerEvent
cmp.getEvent("evtName");
```

