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

# `__GetEvents`

## Introduction

Returns all event listeners of the Element in the form of an array.

## Syntax

```jsx
__GetEvents(element: Element) : Array<Record<string, any>>;
```

### Parameters

|   Key   | Description         |
| :-----: | ------------------- |
| element | Any Element object. |

### Return Value

Returns an array of all event listeners for the current Element, where each element in the array is a map that describes a single event listener.

## Example

The frontend framework can retrieve the event listeners 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 listeners = __GetEvents(element);
```
