Interface: Storage
Defined in: types/desktop-engine.d.ts:4630
Keys and values (strings), like in browsers; the items are also properties (storage.name = 'x', Object.keys(storage)). Up to 5 MB each (keys and values together, counted in UTF-16 code units): over that, setItem throws a QuotaExceededError DOMException.
Indexable
[name: string]: anyProperties
length
readonly length: number;Defined in: types/desktop-engine.d.ts:4632
The number of items
Methods
clear()
clear(): void;Defined in: types/desktop-engine.d.ts:4634
Removes every item
Returns
void
getItem()
getItem(key): string | null;Defined in: types/desktop-engine.d.ts:4636
The value, null when there's no such key
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
string | null
key()
key(index): string | null;Defined in: types/desktop-engine.d.ts:4638
The key at the index, in the order they were added; null past the end
Parameters
| Parameter | Type |
|---|---|
index | number |
Returns
string | null
removeItem()
removeItem(key): void;Defined in: types/desktop-engine.d.ts:4639
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
void
setItem()
setItem(key, value): void;Defined in: types/desktop-engine.d.ts:4641
Stores the value as a string
Parameters
| Parameter | Type |
|---|---|
key | string |
value | string |
Returns
void
