div-action-set-stored-value
Temporarily saves the variable in storage.
Parameters
| Parameters | Description |
|---|---|
lifetime |
int Required parameter. Duration of storage in seconds. |
name |
string Required parameter. Name of the saved variable. |
type |
string Required parameter. The value must always be |
value |
object Required parameter. Saved value. The value has the type List of possible values: |
scope |
string Scope of the stored variable: global — not bound to a specific card (available for any card);card — bound to the current card. On Android the card is identified by DivDataTag, on iOS by the cardId parameter, on Web the scope value is passed to Store and the developer integrating DivKit must implement saving variables for that scope.global'. For Web, the implementation depends entirely on the developer.</p><p>Possible values: global, card`. |
JSON
{
type*: "set_stored_value",
lifetime*: "int",
name*: "string",
scope: "string",
value*: div-typed-value
}
Was the article helpful?
Previous