# HasPointerCapture(IEventHandler, int)

> Tests whether the element has captured the pointer.

## Definition

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

```csharp
public static bool HasPointerCapture(this IEventHandler handler, int pointerId)
```

### Parameters

**** (\[IEventHandler]\(/engine/6000.7/script-reference/unityengine/uielements/ieventhandler)): The VisualElement being tested.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The captured pointer.

### Returns

| Type                                                          | Description                           |
| ------------------------------------------------------------- | ------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if element captured the pointer. |
