Skip to content
Discussion options

You must be logged in to vote

The function you're looking for is probably this one in web-sys: https://docs.rs/web-sys/latest/web_sys/struct.Element.html#method.get_bounding_client_rect

Note that you need to have a web-sys dependency with the DomRect feature enabled; web-sys feature gates most APIs for compile time benefits.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@JasonGH17
Comment options

Answer selected by JasonGH17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants