hyTags
HomeHome DocumentationDocumentation

storage-set

Stores a value in browser storage with the specified key.
Parameter
Type
Description
key
String
The key to store the value under
value
T?
The value to store
type
Type?
The type of value to retrieve from last value if value is not provided
persistent
Bool?
Whether to use localStorage (true) or sessionStorage (false/null)
return
void
No return value
Test Case:Set and get string value from stack
    <div></div>
    
    <string-new value="testValue">
    <storage-set key="strKey" type="string">
    <storage-get key="strKey">
    <assert-equal value="testValue" type="string">
    
    👆 Try to change something!
  • Test succeeded Test failed