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

# `__GetElementUniqueID`

## 介绍

返回 Element 的唯一 id。

## 语法

```jsx
__GetElementUniqueID(element: Element) : number;
```

### 参数

|   Key   | 说明              |
| :-----: | --------------- |
| element | 任意的 Element 对象。 |

### 返回值

目前返回值是一个 Element 对象在当前 LynxView 内的唯一 ID，是一个 number。

## 示例

前端框架可以按下如下的方法获取 Element 的唯一 ID。

```jsx
let element = __CreateElement('view', 0, {});
let id = __GetElementUniqueID(element);
```
