Skip to content

StorageAdapter

A key-value store the cart keeps its entries in. Values are text; the cart writes JSON.

get(key): string | null

string

string | null


remove(key): void

string

void


set(key, value): void

string

string

void


subscribe(listener): () => void

Calls listener when another tab (or, for a store with no native event, this one) changed an entry. key is the entry that changed, or null when it cannot be said (everything). Returns a function that stops listening.

(key) => void

() => void