Model JavaScriptEngine

javascript::JavaScriptEngine


Parameters

↳ const code: string = ""
↳ const loop_iteration_limit: u64 = 4294967295
↳ const recursion_limit: u64 = 400
↳ const stack_size_limit: u64 = 1024
↳ const strict: bool = false


Provides JavaScript execution engine.

The JavaScript/ECMAScript engine manages execution of JS language within Mélodium. First, an engine is instancied with code parameter, that code can contains functions definitions, variables setup, and whatever seems useful for incoming use. Then process treatment is used for doing JavaScript processing.

Other parameters are defined:

  • stack_size_limit: Maximum stack size the JavaScript code may use, in bytes.
  • recursion_limit: Maximum recursion that can be reached.
  • loop_iteration_limit: Maximum iteration that can occur on any loop.
  • strict: Defines JavaScript interpretation strictness, can be override by "use strict" instruction in JavaScript code.