Storage
@Js
class Storage : Obj
Storage models a DOM Storage.
See pod doc for details.
Store value under this key
Return the number of items in storage
Return a list of all keys for this index
Return Obj stored under this key, or null if key does not exist
Remove all items from storage
Return the key value for this index
Remove value for this key
Void clear()
Remove all items from storage. If store was empty, this method does nothing.
@Operator
Obj? get(Str key)
Return Obj stored under this key, or null if key does not exist.
Str? key(Int index)
Return the key value for this index. If the index is greater than or equal to size returns null.
Str[] keys()
Return a list of all keys for this index.
Void remove(Str key)
Remove value for this key. If no value for this key exists, this method does nothing.
@Operator
Void set(Str key, Obj val)
Store value under this key.
Int size()
Return the number of items in storage.