ScalarModel
The ScalarModel class stores local Scalar API data. Once the Scalar API JavaScript library is loaded, the ScalarModel object is available through the “model” property of the globally-scoped variable “scalarapi”.
Methods
Method | Type | Description |
---|---|---|
getBookNode() | ScalarNode | Returns the node representing the current book, if it can be found. |
getMainMenuNode() | ScalarNode | Returns the node representing the current book’s main menu, if it can be found. |
getNodes( sort:string ) | array | Returns an array all nodes for which data has been loaded, sorted according to the specified criteria (currently the only option is “alphabetical”). |
getNodesWithProperty( property:string, value:*, sort:string ) | array | Returns an array of all nodes for which data has been loaded, that match the specified criteria. Method parameters:
|
Previous page on path | Scalar API JavaScript library reference, page 2 of 5 | Next page on path |
Discussion of "ScalarModel"
Add your voice to this discussion.
Checking your signed in status ...