# GetCapturingElement(IPanel, int)

> Returns the element that is capturing the pointer.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.7/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
public static IEventHandler GetCapturingElement(this IPanel panel, int pointerId)
```

### Parameters

**** (\[IPanel]\(/engine/6000.7/script-reference/unityengine/uielements/ipanel)): The panel that holds the element.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The captured pointer.

### Returns

| Type                                                                                     | Description                                |
| ---------------------------------------------------------------------------------------- | ------------------------------------------ |
| [IEventHandler](/engine/6000.7/script-reference/unityengine/uielements/ieventhandler.md) | The element that is capturing the pointer. |
