# FrameCollection Object

> Contains all frames of a Text Control document or part of the document.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Object
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > FrameCollection Object
- **515 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/framecollection/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/framecollection/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/framecollection/llms-full.txt

---

### Description

Contains all [frames](https://docs.textcontrol.com/ds-server/reference/javascript/framebase/llms-full.txt) of a Text Control document or part of the document.

### Syntax

```javascript
FrameCollection
```

### Examples

The following example demonstrates `FrameCollection` in a practical document-editing workflow. It contains all frames of a Text Control document or part of the document.

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

function inspectFrameCollection(frames) {
    frames.getItem(
        function(frame) {
            if (!frame) {
                console.warn("No frame base was returned.");
                return;
            }
            
            console.log("get item result:", frame);
        },
        onTxError,
        25
    );
}
```

---

## In This Section

- [Javascript: FrameCollection.getItem Method](https://docs.textcontrol.com/ds-server/reference/javascript/framecollection/getitem-method/llms-full.txt): Gets the frame selected by the user or the frame with the specified identifier.
- [Javascript: FrameCollection.getItemByName Method](https://docs.textcontrol.com/ds-server/reference/javascript/framecollection/getitembyname-method/llms-full.txt): Gets the frame with the specified name.
- [Javascript: FrameCollection.remove Method](https://docs.textcontrol.com/ds-server/reference/javascript/framecollection/remove-method/llms-full.txt): Removes a frame from a Text Control document.

---

## Nearby

- **Previous:** [FrameCallback Function](https://docs.textcontrol.com/ds-server/reference/javascript/framecallback/llms-full.txt)
- **Next:** [Javascript: FrameCollection.getItem Method](https://docs.textcontrol.com/ds-server/reference/javascript/framecollection/getitem-method/llms-full.txt)
