Support scrollIntoView alignment options (#3952)
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
1 parent
85b373deff
commit
28d38307a2
7 files changed
+79
-19
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user