ReaderPublicationStorageArea

Provides access to a storage area such as localStorage or sessionStorage used by scripted content documents.

Functions

Link copied to clipboard
abstract fun clear()

Remove all items from this storage area.

Link copied to clipboard
abstract fun getItem(key: String): String?

Get the value for the specified key, or null if the key does not exist in this storage area.

Link copied to clipboard
abstract fun getItems(): Map<String, String>

Get all items in this storage area as an array of key-value pairs.

Link copied to clipboard

Get the type of this storage area.

Link copied to clipboard
abstract fun removeItem(key: String)

Remove the key from the storage if it exists.

Link copied to clipboard
abstract fun setItem(key: String, value: String)

Add the key to the storage, or update that key's value if it already exists.

Link copied to clipboard
abstract fun setItems(items: Map<String, String>)

Adds or updates the items in this storage from the provided list of key-value pairs.

Link copied to clipboard
abstract suspend fun setItemsAsync(items: Map<String, String>)

Adds or updates the items in this storage from the provided list of key-value pairs.