Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The amount of data that can be stored depends entirely on the browser or device, but can be as much as 10Mb. If you intend to use browser storage features for anything beyond a small amount of data, it is recommended that you familiarize yourself with the capabilities of your target platform and devices.

     * Save the supplied value in the browser local storage
Mthroutine Name(SaveValue)
Define_Map For(*Input) Class(#Prim_alph) Name(#Name)
Define_Map For(*Input) Class(#Prim_alph) Name(#Value)
 
If (#sys_web.localStorage<#Name> *Is *null)
 
#sys_web.localStorage.Add( #Name #Value )
 
Else
 
#sys_web.localStorage<#Name> := #Value
 
Endif
 
Endroutine

* Restore a value from the browser local storage
Mthroutine Name(RestoreValue)
Define_Map For(*Input) Class(#Prim_alph) Name(#Name)
Define_Map For(*Result) Class(#Prim_alph) Name(#Result)
 
If (#sys_web.localStorage<#Name> *IsNot *null)
 
#Result := #sys_web.localStorage<#Name>
 
Endif
 
Endroutine