LabVantage JavaScript Utilities |
Content |
||||||
|
Code Completion Utility |
|
|
When working with Page/Page Type/Element properties that accept JavaScript entry, the "Code Completion Utility" provides autocompletion of JavaScript objects and methods available in the JavaScript Global API, as well as a full-text JavaScript editor. Here is an example of how it works.
Suppose you want to add your own custom JavaScript in a User button, but you are not certain which JavaScript objects and methods are available in the JavaScript Global API for this specific property. Clcik the ellipsis (below).
![]() |
This opens a full-text JavaScript editor. Press Ctrl-Space to see each object available in the JavaScript Global API. Each time you select a branch in the object tree, provide the dot (.) delimiter, then press Ctrl-Space to see the next available branch until you finally get to the methods available for the selected object as shown in the example below, which fires sapphire.page.list.edit (sEditPage,sEditTarget,oInitValidation,lStoreSelection). Replace the property names with their values, and the "edit" method is ready to be called on the sapphire.page.list object.
![]() |
These editing functions are also available in the full-text JavaScript editor:
![]() |