IStorage class

IStorage class

This interface of the Web Storage API provides access to a particular domain’s session or local storage. See Web Storage specification:

The IStorage type exposes the following members:

Properties

PropertyDescription
lengthReturns the number of key/value pairs.

Methods

MethodDescription
keyReturns the name of the nth key, or null if n is greater than or equal to the number of key/value pairs.
get_itemReturns the current value associated with the given key, or null if the given key does not exist.
set_itemSets the value of the pair identified by key to value, creating a new key/value pair if none existed for key previously.
remove_itemRemoves the key/value pair with the given key, if a key/value pair with the given key exists.
clearRemoves all key/value pairs, if there are any.

See Also