<!--
{
  "availability" : [
    "iOS: 17.4.0 -",
    "iPadOS: 17.4.0 -",
    "tvOS: 17.4.0 -",
    "visionOS: 1.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "BrowserEngineKit",
  "identifier" : "/documentation/BrowserEngineKit/BETextDocumentRequest",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "BrowserEngineKit"
    ],
    "preciseIdentifier" : "c:objc(cs)BETextDocumentRequest"
  },
  "title" : "BETextDocumentRequest"
}
-->

# BETextDocumentRequest

A description of the contextual information that a text document request retrieves.

```
class BETextDocumentRequest
```

## Overview

The [`BETextInput`](/documentation/BrowserEngineKit/BETextInput) protocol’s [`requestDocumentContext(_:completionHandler:)`](/documentation/BrowserEngineKit/BETextInput/requestDocumentContext(_:completionHandler:)) and [`selectPosition(at:for:completionHandler:)`](/documentation/BrowserEngineKit/BETextInput/selectPosition(at:for:completionHandler:)) methods take an instance of this class as an argument.

## Topics

### Scoping the document request

[`surroundingGranularity`](/documentation/BrowserEngineKit/BETextDocumentRequest/surroundingGranularity)

The unit of measurement for the document request’s scope.

[`granularityCount`](/documentation/BrowserEngineKit/BETextDocumentRequest/granularityCount)

A count of granularity units that defines the scope of the document request.

### Specifying the requested information

[`options`](/documentation/BrowserEngineKit/BETextDocumentRequest/options-swift.property)

A set of options that describes the contextual information the system requests from the document.

[`BETextDocumentRequest.Options`](/documentation/BrowserEngineKit/BETextDocumentRequest/Options-swift.struct)

Options that describe the contextual information for a text document request.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)