div-action

It defines an action when clicking on an element.

Parameters

Parameters Description
log_id

string

Required parameter.

Logging ID.

download_callbacks

object

Callbacks that are called after data loading.

The value has the type div-download-callbacks.

Available platforms: Android, iOS, web.

is_enabled

bool_int

The parameter disables the action. Disabled actions stop listening to their associated event (clicks, changes in visibility, and so on).

Default value: true.

log_url

string

URL for logging.

The value must be a valid URL.

menu_items

array

Context menu.

payload

object

Additional parameters, passed to the host application.

referer

string

Referer URL for logging.

The value must be a valid URL.

Available platforms: Android, iOS.

scope_id

string

The ID of the element within which the specified action will be performed.

Available platforms: Android, iOS, web.

target

string

The tab in which the URL must be opened.

Possible values: _self, _blank.

Available platforms: web.

typed

object

The value has the type div-action-typed.

List of possible values:

  • div-action-animator-start
  • div-action-animator-stop
  • div-action-array-insert-value
  • div-action-array-remove-value
  • div-action-array-set-value
  • div-action-clear-focus
  • div-action-copy-to-clipboard
  • div-action-dict-set-value
  • div-action-download
  • div-action-focus-element
  • div-action-hide-tooltip
  • div-action-scroll-by
  • div-action-scroll-to
  • div-action-set-state
  • div-action-set-stored-value
  • div-action-set-variable
  • div-action-show-tooltip
  • div-action-submit
  • div-action-timer
  • div-action-video
  • url

    string

    URL. Possible values: url or div-action://. To learn more, see Interaction with elements.

    The value must be a valid URL.

    Parameters Description
    text

    string

    Required parameter.

    Menu item title.

    action

    object

    One action when clicking on a menu item. Not used if the actions parameter is set.

    The value has the type div-action.

    actions

    array

    Multiple actions when clicking on a menu item.

    JSON
    {
      download_callbacks: {
        on_fail_actions: [ div-action, ... ],
        on_success_actions: [ div-action, ... ]
      },
      is_enabled: "bool_int",
      log_id*: "string",
      log_url: "string",
      menu_items: [
        {
          action: div-action,
          actions: [ div-action, ... ],
          text*: "string"
        },
        ...
      ],
      payload: "object",
      referer: "string",
      scope_id: "string",
      target: "string",
      typed: div-action-typed,
      url: "string"
    }