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