fix(interpreter): missing scrollTo boolean return value (#3734)

* fix(interpreter): missing scrollTo boolean return value

* docs(examples): unwrap scroll_to instead of discarding result values
This commit is contained in:
Youn Mélois authored and GitHub committed 2025-02-13 11:37:13 -08:00
1 parent fc1f1c26f1
commit c13fb06bfa
9 files changed
+11 -9

No files matched your search

+3 -1
View File
@@ -106,11 +106,13 @@ export class NativeInterpreter extends JSChannel_ {
return JSON.stringify({ method, params });
}
scrollTo(id: NodeId, behavior: ScrollBehavior) {
scrollTo(id: NodeId, behavior: ScrollBehavior): boolean {
const node = this.nodes[id];
if (node instanceof HTMLElement) {
node.scrollIntoView({ behavior });
return true;
}
return false;
}
getScrollHeight(id: NodeId): number | undefined {