Skip to content

PluginStorage

Values kept in this browser for the plugin, as JSON in localStorage, which a page shares and browsers cap at about 5 MB: keep them small. Storage may be unavailable or full (a private window): then nothing is kept, without an error, so read back what you rely on.

delete(key): Promise<void>;
Parameter Type
key string

Promise<void>


get<T>(key): Promise<T | undefined>;

A value as set; T says what you kept there, unchecked.

Type Parameter Default type
T JsonValue
Parameter Type
key string

Promise<T | undefined>


set<T>(key, value): Promise<void>;

Keeps a value JSON can hold: a list of objects, a string.

Type Parameter
T
Parameter Type
key string
value T

Promise<void>