Skip to main content

CommonCallFunctionByName

Callable

  • CommonCallFunctionByName(FunctionName: string, ...args: any): any

  • Calls a named global function with the passed in arguments, if the named function exists. Differs from CommonDynamicFunctionParams in that arguments are not parsed from the passed in FunctionName string, but passed directly into the function call, allowing for more complex JS objects to be passed in. This function will not log to console if the provided function name does not exist as a global function.


    Parameters

    • FunctionName: string

      The name of the global function to call

    • rest...args: any

      zero or more arguments to be passed to the function (optional)

    Returns any

    • returns the result of the function call, or undefined if the function name isn't valid