Currently if one defines a global variable using JavaScript in Text area, the global variable remains there even after analysis is closed. The same applies if global timer is defined, it won't stop running until Analyst is close.
As per support, this is a designed behavior.
=========
The script is executed in the browser & not in the context of the text area. Being able to execute code in the scope of the browser is powerful but comes with responsibility. In this case, you should refrain from declaring global timers or stop the timer when necessary. There are currently no JavaScript life-cycle events that Spotfire provides that would help them stop the timer.
=========
Our concerns are that this could cause data leak (data being defined in this analyis is passed to the next open one, customer needs to avoid doing this.), we hope Analyst can reset browser after analysis is closed to make sure everything belongs to this analysis is cleared on close.
This type of use of the text area goes against our best practices. In case of security concerns, the admin can easily turn on html sanitation and control which users have the script author privilege.
ADMIN RESPONSE
This type of use of the text area goes against our best practices. In case of security concerns, the admin can easily turn on html sanitation and control which users have the script author privilege.
=> If something can be risky, turning if off is indeed the simplest solution.
We are seeking a more robust way to both utilize the power of JavScript and ensure data security.
PS, even TIBCO's best practice is encouring use of global variables, e.g.