@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="Storage")
public class Storage
extends JsObject
| Modifier | Constructor and Description |
|---|---|
protected |
Storage() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
The clear() method of the Storage interface clears all keys stored in a given Storage object.
|
@JsNullable java.lang.String |
getItem(java.lang.String key)
The getItem() method of the Storage interface, when passed a key name, will return that key's value, or null if the key does not exist, in the given Storage object.
|
@JsNullable java.lang.String |
key(int index)
The key() method of the Storage interface, when passed a number n, returns the name of the nth key in a given Storage object.
|
int |
length()
The length read-only property of the Storage interface returns the number of data items stored in a given Storage object.
|
void |
removeItem(java.lang.String key)
The removeItem() method of the Storage interface, when passed a key name, will remove that key from the given Storage object if it exists.
|
void |
setItem(java.lang.String key,
java.lang.String value)
The setItem() method of the Storage interface, when passed a key name and value, will add that key to the given Storage object, or update that key's value if it already exists.
|
assign, create, create, defineProperties, defineProperty, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyDescriptor, getOwnPropertyDescriptors, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toString_, valueOf_, values@JsProperty(name="length") public int length()
public void clear()
public @JsNullable java.lang.String key(int index)
public @JsNullable java.lang.String getItem(@Nonnull
java.lang.String key)
public void setItem(@Nonnull
java.lang.String key,
@Nonnull
java.lang.String value)
public void removeItem(@Nonnull
java.lang.String key)