diff --git a/resources/docs/docs/advanced-property-syntax.md b/resources/docs/docs/advanced-property-syntax.md index b100eb28..43436729 100644 --- a/resources/docs/docs/advanced-property-syntax.md +++ b/resources/docs/docs/advanced-property-syntax.md @@ -109,3 +109,5 @@ This syntax allows writing formulas in pure javascript. The code will be compile - 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 +- `setTimeout` and `setInterval` functions are not available +- the `global` object is shared between all javascript formulas (changing its properties *does not* trigger any synchronisation even if the value is used somewhere else) diff --git a/src/client/app/widgets/utils.js b/src/client/app/widgets/utils.js index d9a7c11f..e2d3ee26 100644 --- a/src/client/app/widgets/utils.js +++ b/src/client/app/widgets/utils.js @@ -134,6 +134,7 @@ module.exports = { intervals = {} sandbox.contentWindow.console = console + sandbox.contentWindow.global = {} document.documentElement.removeChild(sandbox)