class

Storage

@Js
class Storage : Obj

Storage models a DOM Storage.

See pod doc for details.

methods set

Store value under this key

size

Return the number of items in storage

keys

Return a list of all keys for this index

get

Return Obj stored under this key, or null if key does not exist

clear

Remove all items from storage

key

Return the key value for this index

remove

Remove value for this key

clear Void clear()

Remove all items from storage. If store was empty, this method does nothing.

get @Operator
Obj? get(Str key)

Return Obj stored under this key, or null if key does not exist.

key Str? key(Int index)

Return the key value for this index. If the index is greater than or equal to size returns null.

keys Str[] keys()

Return a list of all keys for this index.

remove Void remove(Str key)

Remove value for this key. If no value for this key exists, this method does nothing.

set @Operator
Void set(Str key, Obj val)

Store value under this key.

size Int size()

Return the number of items in storage.

Haxall 4.0.5 ∙ 24-Feb-2026 14:33 EST