From daab595d46b5860f49511d530afb7b278ef997aa Mon Sep 17 00:00:00 2001 From: bordun Date: Wed, 24 Jun 2020 15:21:21 +0200 Subject: [PATCH] docs: avoid advanced syntax in scripts --- resources/docs/docs/widgets/scripting.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/docs/docs/widgets/scripting.md b/resources/docs/docs/widgets/scripting.md index 47bcf805..f75de7ab 100644 --- a/resources/docs/docs/widgets/scripting.md +++ b/resources/docs/docs/widgets/scripting.md @@ -5,6 +5,9 @@ The `script` property allows widgets to run javascript code when their value upd - no `JS{{}}` wrapper, just the code - `@{}`, `OSC{}`, `JS{{}}` and `#{}` blocks are replaced with their value before the script's compilation +!!! warning "Avoid advanced syntax in scripts" + To avoid syntax errors it is recommended to use `getProp()` and `get()` instead of `@{}` and `OSC{}`. `JS{{}}` and `#{}` blocks should be avoided here as well. + ## Event-dependent variables Depending on what triggered the script's execution, a few variables are available to help determine the execution conditions.