HTML5 Front-End Functions

Here are the built-in functions implemented by the front end in the "html5" module.

The names of front-end functions and pre-defined arguments are case-sensitive.

eval

Executes the JavaScript provided as the argument:

ui.Interface.frontCall("html5","eval", [text], [result])

text = text to be interpreted as JAVA script

result = variable which holds the results of the function execution

 LyciaDesktop: yes

 LyciaWeb: yes

fileinfo

Returns size, MIME type, and time of previous modification for any file specified as an argument:

ui.Interface.frontCall("html5","fileinfo", [file_name], [result])

file_name = name of the file in interest

result = variable which holds the results of the function execution

For LyciaWeb, will work only if there is a TextField in the Lycia form with the FileUpload class.

 LyciaDesktop: yes

 LyciaWeb: yes

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:

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

key = name to be given to the HTML5 local storage

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

result = variable which holds the results of the function execution

 LyciaDesktop: yes

 LyciaWeb: yes

getLocalStorage

Returns values stored in the HTML5 local storage by the name specified as an argument:

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

key = name of the HTML5 local storage

result = variable which holds the results of function execution

 LyciaDesktop: yes

 LyciaWeb: yes

styleImport

Imports CSS styles by URL:

ui.Interface.frontCall("html5","styleImport", ["url","copy", id], [])

url = URL of the imported style

copy (optional) = specifies whether the imported style must be copied to native window context for LyciaDesktop

id (optional) = identifier for the imported style

Any URL pattern can be used, including qx:// <> to access files which are already part of the project.

 LyciaDesktop: yes

 LyciaWeb: yes

scriptImport

Imports script files by URL:

ui.Interface.frontCall("html5","scriptImport", ["url","nowait"], [])

url = URL of the imported script

nowait(optional) = specifies whether the function should exit immediately without waiting for the successful script uploading

Any URL pattern can be used, including qx:// <> to access files which are already part of the project.

 LyciaDesktop: yes

 LyciaWeb: yes

htmlImport

Imports HTML5 WebComponents.

A new experimental HTML importing facility currently not supported by browsers, so it is unlikely that it will work properly unless some simulation libraries are loaded.

 

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.