script: add getIndex function

This commit is contained in:
bordun 2020-11-03 09:11:53 +01:00
parent beb0e851a1
commit 0adb418303
3 changed files with 19 additions and 1 deletions

View file

@ -96,6 +96,13 @@ Returns the property called `"name"` of the first matching widget.
----
#### `getIndex(id)`
- `id` (optional): widget `id` as a string. Defaults to `"this"`.
Returns the widget's index in its container.
----
#### `updateProp(id, name)`
- `id`: widget `id` as a string. Can be `"this"` to target the host widget, or `"parent"` to target the parent widget.
- `name`: property name.