Skip to main content
Version: 9.0.2

gra.js

Cause a JavaScript function to execute.

Plugin libgre-plugin-js

Options script The name of the Lua function to invoke

Additional arguments can be passed to the function by providing additional key/value pairs to the action. The key/value pairs are provided to the JavaScript function as values in the argument object.

For example to call the JS function myfunction with an extra argument, firstargument, that corresponds to the value of the application variable myvar you would simply add a new entry to the parameter list.

The corresponding call to the JS function would fill the entry into the object such that:

function myfunction(context) {
print("The value is: " + context.firstargument.tostring());
}

would print out the value of ${app:myvar}.