> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# `__GetEvent`

## Introduction

Returns the event listener specific to the Element.

## Syntax

```jsx
__GetEvent(element: Element, name: string, type: string) : string|Function|undefined;
```

### Parameters

|   Key   | Description                                          |
| :-----: | ---------------------------------------------------- |
| element | Any Element object.                                  |
|   name  | A case-sensitive string representing the event name. |
|   type  | A case-sensitive string representing the event type. |

### Return Value

Returns the event listener for the current Element with the specified name.

## Example

The frontend framework can retrieve the event listener of an Element as follows.

```jsx
// main-thread.js
let element = __CreateElement('view', 0, {});
__SetAttribute(element, 'src', 'xx');

__SetEvents(element, [{ type: 'bindEvent', name: 'tap', function: 'onTap' }]);

let listener = __GetEvent(element, 'tap', 'bindEvent');
```
