scripting: add scrollIntoView()

This commit is contained in:
jean-emmanuel 2026-04-23 10:14:03 +02:00
parent 22068ab47e
commit 7fc5372ca1
3 changed files with 26 additions and 6 deletions

View file

@ -328,10 +328,6 @@ Gives focus to a widget (ie input widget). If `id` is omitted or falsy, currentl
Returns the scroll position of a container as a `[x, y]` array.
**Deprecated**
Scrollable panels expose their scroll position normalized between 0 and 1 with their value.
----
#### `setScroll(id, x, y)`
@ -341,9 +337,14 @@ Scrollable panels expose their scroll position normalized between 0 and 1 with t
Sets the scroll state of a container.
**Deprecated**
----
#### `scrollIntoView(id, option)`
- `id`: widget `id` as a string. Can be `"this"` to target the host widget, or `"parent"` to target the parent widget.
- `option`: `alignToTop` or `options` argument as defined in https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
Scroll containers to make widget(s) visible.
Scrollable panels expose their scroll position normalized between 0 and 1 with their value.
----