# Javascript: TrackedChange.getActive Method

> Gets a value specifying whether the TrackedChange is currently active or not.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: TrackedChange.getActive Method
- **499 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/trackedchange/getactive-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/trackedchange/getactive-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/trackedchange/getactive-method/llms-full.txt

---

### Description

Gets a value specifying whether the TrackedChange is currently active or not.

### Syntax

```javascript
<void> TrackedChange.getActive(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives whether the TrackedChange is currently active or not. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `TrackedChange.getActive` in a practical document-editing workflow. It gets a value specifying whether the TrackedChange is currently active or not.

```javascript
function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

TXTextControl.textParts.getMainText(function(mainText) {
    const trackedChanges = mainText.trackedChanges;
    trackedChanges.getItem(function(trackedChange) {
        if (!trackedChange) {
            console.warn("No tracked change is available at the current input position.");
            return;
        }
    
        trackedChange.getActive(
            function(result) {
                if (result) {
                    console.log("get active is available.");
                } else {
                    console.warn("get active is not available in the current document state.");
                }
            },
            onTxError
        );
    }, onTxError);
}, onTxError);
```

---

## Nearby

- **Previous:** [TrackedChange Object](https://docs.textcontrol.com/ds-server/reference/javascript/trackedchange/llms-full.txt)
- **Next:** [Javascript: TrackedChange.getChangeKind Method](https://docs.textcontrol.com/ds-server/reference/javascript/trackedchange/getchangekind-method/llms-full.txt)
