diff --git a/resources/docs/docs/advanced-property-syntax.md b/resources/docs/docs/advanced-property-syntax.md index 98c6d3b4..b100eb28 100644 --- a/resources/docs/docs/advanced-property-syntax.md +++ b/resources/docs/docs/advanced-property-syntax.md @@ -101,3 +101,11 @@ Additionnal functions: !!! tip "" A single widget property can contain multiple formulas. Variables and functions declared in a formula are available to subsequent formulas in the same property definition. + + +## Javascript: `JS{{}}` + +This syntax allows writing formulas in pure javascript. The code will be compiled as a function and executed a restricted context. + +- if no `return` statement is found, the formula will return an empty string +- javascript [strict mode](https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Strict_mode) is always enabled