JavaScript files

The UIM SCRIPT element allows events on the page to trigger JavaScript functions. Provide a relative path to the JavaScript file from your component folder.

For example, you can refer to the MyComponent/scripts/myScript.js in the SCRIPT tag as follows:

<SCRIPT SCRIPT_FILE="scripts/myScript.js" ...>

The paths that you specify are fully preserved during application generation.

JavaScript allows HTML and CSS to be queried and manipulated. The underlying HTML and CSS source code used to style the Cúram application is not documented. No guarantees are made about its stability across Cúram releases. Therefore, custom JavaScript may have to be updated in line with changes to HTML structure.

JavaScript APIs for use in the custom JavaScript code are provided within the Cúram application and documented in CuramCDEJ\doc\Javascript\index.html. Use of any other Cúram JavaScript APIs, discovered through web developer tools for example, is not supported. The same is true of the JavaScript APIs and functions of third party frameworks used within the Cúram application. While there is nothing prevent a developer using these, using them means the code will be impacted by changes to the Cúram application in future releases.

Using the techniques described above to add new JavaScript files to the custom component, new third party APIs could be added to Cúram pages. This is at the customer's discretion, as no guarantees can be made on third-party APIs that have not been used and verified within the Cúram application.