---
title: "updateSelection(extent:boundary:completionHandler:)"
framework: browserenginekit
role: symbol
role_heading: Instance Method
path: "browserenginekit/betextinput/updateselection(extent:boundary:completionhandler:)"
---

# updateSelection(extent:boundary:completionHandler:)

Includes the text up to the given point in the current text selection.

## Declaration

```swift
func updateSelection(extent point: CGPoint, boundary granularity: UITextGranularity, completionHandler: @escaping @Sendable (Bool) -> Void)
```

```swift
func updateSelection(extent point: CGPoint, boundary granularity: UITextGranularity) async -> Bool
```

## Parameters

- `point`: The location in the document to include in the updated selection.
- `granularity`: The amount of text to include in the updated selection.
- `completionHandler`: A block you call after your text view handles the gesture.

## Mentioned in

Integrating custom browser text views with UIKit
