State Function Reference

A state is an anonymous JavaScript function with one input parameter. This function will determine the event (a moment in time or interaction of a client) and submit a callback.

Anonymous Function Input Parameter: {function} initState

The state code statement must begin with an anonymous function with an input object. That input is a callback function and must be called whenever this JENTIS State is determined to be activated.

Further the initState (callback function) takes an Object as the input with certain properties. This object and its properties is optional and only for advanced users.

initState input Object properties:

  • stateCallback: if you want to call a function after this JENTIS State was processed this is the place to go.

  • contextualStateInformation: this is a customizable Object that you can submit when this JENTIS State is processed and access this properties and values in JENTIS Frontend Variables.

For the usage of this advanced settings please see in the section below for a detailed use case running through this options.

Last updated

Was this helpful?