mrdocs::js::Scope::script
Compile and run a script.
Synopsis
Declared in <mrdocs/Support/JavaScript.hpp>
Expected<void>
script(std::string_view jsCode);
Description
This function compiles and executes the specified JavaScript code. The script can be used to execute commands or define global variables in the parent context.
It evaluates the ECMAScript source code and converts any internal errors to Error.
Parameters
| Name | Description |
|---|---|
jsCode |
The JavaScript code to execute. |
Created with MrDocs