UI Scripts without function

Impact area

Scalability 

Severity

Medium

Affected element

UI Scripts

Rule ID

SN-0155

Impact

Client scripts without a function cause issues with variable scope. When code is not enclosed in a function, variables and other objects are available and shared to all other client-side scripts.

Remediation

Ensure that all code is wrapped in a function.

Time to fix

15 min




Last modified on Jun 9, 2020