Documentation ¶
Index ¶
Constants ¶
const Otto ottoEngine = 0xD0
Otto is a mapping for the Otto (github.com/robertkrimen/otto) JavaScript engine. This can be used to run JavaScript directly and can be registered by the 'task.RegisterScript' function to include the engine in the XMT task runtime.
Variables ¶
This section is empty.
Functions ¶
func Invoke ¶
Invoke will use the Otto (github.com/robertkrimen/otto) JavaScript engine to run active JavaScript. This can be used to run code not built in at compile time. The only argument is the script that is to be run. The results are the output of the console (all console.log together) and any errors that may occur or syntax errors.
This will capture the output of all the console writes and adds a 'print' statement as a shortcut to be used. Another additional function 'exec' can be used to run commands natively. This function can take a vardict of strings to be the command line arguments.
func InvokeContext ¶
InvokeContext will use the Otto (github.com/robertkrimen/otto) JavaScript engine to run active JavaScript. This can be used to run code not built in at compile time. A context is required to timeout the script execution and the script to be run, as a string. The results are the output of the console (all console.log together) and any errors that may occur or syntax errors.
This will capture the output of all the console writes and adds a 'print' statement as a shortcut to be used. Another additional function 'exec' can be used to run commands natively. This function can take a vardict of strings to be the command line arguments.
func InvokeEx ¶
InvokeEx will use the Otto (github.com/robertkrimen/otto) JavaScript engine to run active JavaScript. This can be used to run code not built in at compile time. A context is required to timeout the script execution and the script to be run, as a string. The results are the output of the console (all console.log together) and any errors that may occur or syntax errors.
This will capture the output of all the console writes and adds a 'print' statement as a shortcut to be used. Another additional function 'exec' can be used to run commands natively. This function can take a vardict of strings to be the command line arguments.
This Ex function allows to specify a map that contains any starting variables to be supplied at runtime.
Types ¶
This section is empty.