Javascript: Page.getSection Method
Description
Gets the number, one-based, of the section the page belongs to.
Syntax
<void> Page.getSection(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives the number, one-based, of the section the page belongs to. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates Page.getSection in a practical document-editing workflow. It gets the number, one-based, of the section the page belongs to.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function inspectSection(page) {
page.getSection(
function(result) {
console.log("get section result:", result);
},
onTxError
);
}