JavaScript documents

Top   Previous   Next

JavaScript document is a special type of data element which represents JavaScript file and allows user to edit, debug and execute scripts.

 

Default collection for JavaScript documents is Data/scripts . You can create new document using right click on script collection in repository and selecting Add script .

Note : the name of script should have suffix js (for example, test.js )

 

JavaScript documents supports Custom functions and host objects , so you can use it in the code.

 

Toolbar actions

 

There are special toolbar actions for JavaScript documents in BioUML:

· Execute JavaScript - start JavaScript execution until breakpoint or the end will be reached.
· Execute selected part of document - start execution of selected part only.
· Execute one line - execute next line of script. Use this action for debugging.
· Break execution - stop JavaScript execution

 

Debugging

 

You can set or remove breakpoint for line by clicking near line number.

To view variable value or expression value use Context/Watch tab

 

Example

 

Below you can see screenshot of example of using JavaScript documents in BioUML.

 

js-document-example