API DOCS
Function: wrapFunction
function wrapFunction($sFunction, $sArgs, $aScripts, $sReturnValueVariable)
Parameters:
sFunction
(string) The name of the existing function to wrap.
sArgs
(string) The comma separated list of parameters for the function.
aScripts
(array) An array of javascript code snippets that will be used to build the body of the function. The first piece of codespecified in the array will occur before the call to the originalfunction, the second will occur after the original function is called.
sReturnValueVariable
(string) The name of the variable that will retain the return value from the call to the original function.
Returns:
object
The object.
