JavaScript functions that are to be executed as action functions, i.e. that are called in the course of an event, must correspond to a specific pattern. Such functions must either have no parameter or only one specific parameter. This parameter is the args parameter.
This is filled with information about the current event (page, component, event).
Valid JavaScript action functions would therefore be, for example:
- function showSlotData(args)
- function anyFunctionName(args)
- function anyFunctionName()
But not:
- function anyFunctionName(args, secondParameter)
- function anyFunctionName(par1)
The args parametercan be read out within the function as follows:
| args[“page”] (args.page) | Returns the name of the page on which the event-triggering component is located. If this component does not have a name, only the ID of the page is returned. |
| args[“element”] (args.element) | Returns the name of the event-triggering component. If this component does not have a name, only its ID is returned. |
| args[“event”] (args.event) | Returns the name of the event. E.g. “Clicked“, “OnMouseDown“, etc. |
