The SavedData functions use localStorage and sessionStorage, with a cookie fallback.
Read the value of a saved variable
The name of the variable
The value (run through
JSON.parse()) or null if it doesn't exist
Remove a saved variable by name.
The name of the value to remove
When restoring from JSON via
JSON.parse, we may pass a reviver function.
In our case, this will check if the object has a specially-named property (
If it does, we will attempt to construct a new instance of that class, rather than using a
plain old Object. Note that this recurses through the object.
The object that was parsed - either cast to a class, or not
A constant to determine if we can use localStorage and sessionStorage