Add access to the Element attributes related to scrolling (#2338)

* Add access to the Element attributes related to scrolling

* Fix clippy warnings

* Restore interpreter/src/js/hash.txt content

* Update generated interpreter files

* Use euclid types as return types

* Remove redundant functions

* It's not necessary for PixelsSize to be in 3D

* Rename PixelsVector to PixelsVector3D and add a PixelsVector2D type

* Remove unused PixelsLength type
This commit is contained in:
ASR-ASU authored and GitHub committed 2024-05-21 12:56:49 -05:00
1 parent e2002d6ea4
commit 460b70e0f0
8 files changed
+188 -70

No files matched your search

+28
View File
@@ -110,6 +110,34 @@ export class NativeInterpreter extends JSChannel_ {
}
}
getScrollHeight(id: NodeId): number | undefined {
const node = this.nodes[id];
if (node instanceof HTMLElement) {
return node.scrollHeight;
}
}
getScrollLeft(id: NodeId): number | undefined {
const node = this.nodes[id];
if (node instanceof HTMLElement) {
return node.scrollLeft;
}
}
getScrollTop(id: NodeId): number | undefined {
const node = this.nodes[id];
if (node instanceof HTMLElement) {
return node.scrollTop;
}
}
getScrollWidth(id: NodeId): number | undefined {
const node = this.nodes[id];
if (node instanceof HTMLElement) {
return node.scrollWidth;
}
}
getClientRect(
id: NodeId
): { type: string; origin: number[]; size: number[] } | undefined {