SetLocalStorage

SetLocalStorage sets the value specified as its second argument to the value of the HTML5 local storage by the name specified as its first argument.

Syntax

ui.Interface.frontCall("html5", "setLocalStorage", ["key", "value"], [result])

Arguments

key

the name to be given to the HTML5 local storage

value

the value set for the HTML5 local storage with the given name

result

the variable which holds the results of the function execution

Usage and examples

ui.Interface.setLocalStorage() is used to store data on the client side.

In the example below, ui.Interface.setLocalStorage() saves a theme snippet in the local storage so that this snippet can be used for creating an application theme by concatenation:

CALL ui.Interface.frontCall("html5", "setLocalStorage", ["my_theme_snippet","<?xml version=\"1.0\" encoding=\"utf-8\"?> <StyleSheet xmlns=\"http://querix.com\"> <ElementFilter ElementName=\"Label\"> <StyleSheet> <DoStyleAction> <SetProperty> <PropertyPath> <PropertyName>Background</PropertyName> <PropertyName>FillColor</PropertyName> </PropertyPath> <PropertyValue type=\"CustomizedColor\" RedColor=\"173\" GreenColor=\"255\" BlueColor=\"47\" Alpha=\"255\" /></SetProperty> </DoStyleAction> </StyleSheet> </ElementFilter> </StyleSheet>"], [res])

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.