Javascript: FrameCollection.remove Method
Description
Removes a frame from a Text Control document.
Syntax
<void> FrameCollection.remove(<FrameBase> frame, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| frame | Specifies the frame to remove. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates FrameCollection.remove in a practical document-editing workflow. It removes a frame from a Text Control document.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function remove(frames, frame) {
frames.remove(
frame,
function() {
console.log("remove completed.");
},
onTxError
);
}