tchmi_css_escape_selector
[ Function ]
function tchmi_css_escape_selector(id: string): string;
Converts a string into a valid CSS ID pattern by masking all reserved characters.
Parameter
Name | Type | Description |
---|---|---|
id | The string to be masked |
Return value
Type | Description |
---|---|
The converted ID. |
Available from version 1.12 |
Sample - JavaScript
TcHmi.Log.debug(tchmi_css_escape_selector('.test')); // '\\.test'