Versions Compared

Key

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

...

    * 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