Javascript: TextFrame.getBorderStyle Method
Description
Gets the style of a text frame's border line.
Syntax
<void> TextFrame.getBorderStyle(<RequestFrameStyleCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives the current property value. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates TextFrame.getBorderStyle in a practical document-editing workflow. It gets the style of a text frame's border line.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function inspectBorderStyle(textFrame) {
textFrame.getBorderStyle(
function(style) {
if (!style) {
console.warn("No frame style was returned.");
return;
}
console.log("get border style result:", style);
},
onTxError
);
}