The JavaScriptEncode()
function encodes the given value to a javascript literal.
Syntax
JavaScriptEncode(value)
Returns
A text that contains a JavaScript literal
Parameters
- value – any WEM value (strings, numbers, boolean, etc.). The following encoding is used for non-native JavaScript types:
- Concept – the concept ID is used
- Concept set – array of concept ID’s is used
- Duration – the number of ticks (milliseconds) is used
- File – the URL as a string
- Reference – string representation of the referenced list and rowID