Adds or updates an item within local storage.
This method can be called no earlier than after the getOfflineStorageCount
method's onSuccess
callback is invoked during the first application start. Otherwise, it fails with
onFailure
callback invoked.
Name | Description | Type | Use |
---|---|---|---|
type | Denotes the type of data to be written. Item types are freely defined data item categories. | string |
required |
handle | Data item identifier. Supports partial matches if full matches are not found. | string |
required |
data | The updated data item's data string. | string |
required |
onSuccess | A callback function, informs that the operation completed successfully. | function |
required |
onFailure | A callback function, called when the operation fails. Passes an error code, as defined in the Constants table in the Client Store article. | function |
required |