Javascript Helpers

Helpers fonctions

Those function are inclued in the core.





create an uniq ID, used for example to associate input with label



parse html string and return DOM fragment


str, variables = {}

eval a string as an es6 template string. example: evalTemplateString('name: ${first} ${last}', {first: 'John', last: 'Doe'})



add style in document if not present



add script in document if not present

If you’re writing a component

Creating a component, you should import those function like this :

import { Helpers } from "";

You should always use importCSS and importJS to make your extra importation. Otherwise, you’ll get this king of message :

Le chargement du module à l’adresse « https://the/road/to/your/extra/script » a été bloqué en raison d’un type MIME interdit (« text/html »).

Store function

Our goal is to avoid manipulating javascript to use our tools. But it can happen that depending on the case you need some small manipulation and these functions can help you.

Each time you need to use javascript for your development, please give us feedback so that we can take into account your problems in the next versions of the framework. Thanks for!