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:
1 parent
fc1f1c26f1
commit
c13fb06bfa
9 files changed
+11
-9
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user