---
title: "selectPosition(at:completionHandler:)"
framework: browserenginekit
role: symbol
role_heading: Instance Method
path: "browserenginekit/betextinput/selectposition(at:completionhandler:)"
---

# selectPosition(at:completionHandler:)

Sets the selection caret to the given point.

## Declaration

```swift
func selectPosition(at point: CGPoint, completionHandler: @escaping @Sendable () -> Void)
```

```swift
func selectPosition(at point: CGPoint) async
```

## Parameters

- `point`: The caret’s new location in the text view.
- `completionHandler`: A closure that you call when the text view handles the gesture.

## Mentioned in

Integrating custom browser text views with UIKit

## See Also

### Managing selection

- [selectedText](browserenginekit/betextinput/selectedtext.md)
- [selectedTextRange](browserenginekit/betextinput/selectedtextrange.md)
- [isSelectionAtDocumentStart](browserenginekit/betextinput/isselectionatdocumentstart.md)
- [selectPosition(at:for:completionHandler:)](browserenginekit/betextinput/selectposition(at:for:completionhandler:).md)
- [adjustSelection(by:completionHandler:)](browserenginekit/betextinput/adjustselection(by:completionhandler:).md)
- [updateCurrentSelection(to:from:in:)](browserenginekit/betextinput/updatecurrentselection(to:from:in:).md)
