Support scrollIntoView alignment options (#3952)

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
Otger RoglaandJonathan Kelley authored and GitHub committed 2025-05-07 13:09:17 -07:00
1 parent 85b373deff
commit 28d38307a2
7 files changed
+79 -19

No files matched your search

+2 -2
View File
@@ -106,10 +106,10 @@ export class NativeInterpreter extends JSChannel_ {
return JSON.stringify({ method, params });
}
scrollTo(id: NodeId, behavior: ScrollBehavior): boolean {
scrollTo(id: NodeId, options: ScrollIntoViewOptions): boolean {
const node = this.nodes[id];
if (node instanceof HTMLElement) {
node.scrollIntoView({ behavior });
node.scrollIntoView(options);
return true;
}
return false;