Storage Api
Methods
Section titled “Methods”deleteValue()
Section titled “deleteValue()”deleteValue(
key):void
Removes a value which has been saved
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
key | string |
Returns
Section titled “Returns”void
getValue()
Section titled “getValue()”getValue(
key,defaultValue?):any
Gets a value that has previously been saved
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
key | string |
defaultValue? | any |
Returns
Section titled “Returns”any
onChange()
Section titled “onChange()”onChange(
key,callback): () =>void
Adds a listener for when a stored value with a certain key changes
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
key | string |
callback | (value, remote) => void |
Returns
Section titled “Returns”Function
Returns
Section titled “Returns”void
setValue()
Section titled “setValue()”setValue(
key,value):void
Sets a value which can be retrieved later, persisting through reloads
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
key | string |
value | any |
Returns
Section titled “Returns”void