DS Server

FrameCollection Object

Object|Introduced in 28.0

Description

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

Syntax

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.

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
    );
}

Members

Methods

MethodDescription
clearRemoves all objects from the collection and from the document. (Inherited from FrameBaseCollection.)
getItemGets the frame selected by the user or the frame with the specified identifier.
getItemByNameGets the frame with the specified name.
removeRemoves a frame from a Text Control document.