Skip to content

Scoped Storage Api

deleteValue(key): void

Removes a value which has been saved

ParameterType
keystring

void


getValue(key, defaultValue?): any

Gets a value that has previously been saved

ParameterType
keystring
defaultValue?any

any


onChange(key, callback): () => void

Adds a listener for when a stored value with a certain key changes

ParameterType
keystring
callback(value, remote) => void

Function

void


setValue(key, value): void

Sets a value which can be retrieved later, persisting through reloads

ParameterType
keystring
valueany

void