-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Feature Request
Currently the onscroll event's ScrollData exposes nothing besides downcasting which leaves downstream users/libraries to deal with platform specifics to obtain scroll position etc.
One example of this is dioxus-lazy where the scroll position is required to calculate which elements to show. What that library does is to keep track of MountedData and on every scroll event downcast that to &web_sys::Element on which scroll_top() is called.
This means that his otherwise great library is limited to only supporting web which is unfortunate.
I attempted to add desktop support but it turns to not even be possible because the equivalent DesktopElement isn't even exposed from the desktop crate.
So instead of requesting that be made public the root issue should be addressed to expose scroll_top() etc in a platform-agnostic way.