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

# selectPosition(at:for:completionHandler:)

Sets the selection caret to the given point.

## Declaration

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

```swift
func selectPosition(at point: CGPoint, for request: BETextDocumentRequest) async -> BETextDocumentContext
```

## Discussion

Discussion The returned document context includes autocorrect information for the new caret location, as a convenience.

## See Also

### Managing selection

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