Navigation:  Reference > Elements >


Previous pageReturn to chapter overviewNext page

Script is a basic element that can allows you to embed raw Javascript code into the simulation.

You can find the "Script" element in the elements pane, and add it into your page.  It looks like:


Different than other elements, Script element is not visible in HTML5 simulation and exported image/PDF, instead it inserts its content (Javascript code) into the HTML5 simulation.  Here is an example of Script content:


When you export your plot into HTML5 simulation, the Javascript block will be inserted into the simulation as well.

Remarks: Embedding inappropriate Javascript code into your plot may get unexpected result in the HTML5 simulation. It is better not to do so, unless you have to, and you really know what you are doing.