validateCode abstract method

void validateCode(
  1. String code
)

Validates that the JavaScript code is safe to execute.

Should check for potentially dangerous operations like:

  • eval()
  • Function constructor
  • Global object access
  • File system operations

Throws JsEvaluationException if code is deemed unsafe.

Implementation

void validateCode(String code);