# RequestSelectionBoundsCallback Function

> Callback function for methods requesting the start position and length of the current selection.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Function
- **Introduced:** 24.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > RequestSelectionBoundsCallback Function
- **180 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/requestselectionboundscallback/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/requestselectionboundscallback/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/requestselectionboundscallback/llms-full.txt

---

### Description

Callback function for methods requesting the start position and length of the current selection.

### Syntax

```javascript
function(<SelectionBounds> bounds, <ErrorArgument> err)
```

### Examples

The following example demonstrates `RequestSelectionBoundsCallback` in a practical document-editing workflow. Callback function for methods requesting the start position and length of the current selection.

```javascript
function requestSelectionBoundsCallback(bounds, err) {
    console.log("Callback values:", { bounds, err });
}
```

---

## Nearby

- **Previous:** [RequestSectionCallback Function](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/requestsectioncallback/llms-full.txt)
- **Next:** [RequestSelectionFormFieldCallback Function](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/requestselectionformfieldcallback/llms-full.txt)
