localValue
Stores and retrieves local values, like settings or something, that you want to have persistent on this specific browser. The value will be saved only for the browser you are currently working on. The value will be save in the scope of the current workspace you are working in.
Parameters
key - Key name
value - (optional) value you want to save. If this is empty, Gebra Suite will return the value, you saved before.
This is not an asynchronous operation. No await needed!
Example Usages
Return Values
The localValue function is a getter and setter for values in the localStorage. It has two modes of operation.
Setter Mode: If the value parameter is provided (not undefined), it sets the value associated with the specified key in the localStorage and returns undefined.
If the value parameter is undefined, it retrieves the value associated with the specified key from the localStorage and returns that value.
If value is provided, it is a setter, and the function returns undefined.
If value is undefined, it is a getter, and the function returns the value associated with the specified key from the localStorage.
Last updated
Was this helpful?