-
-
Notifications
You must be signed in to change notification settings - Fork 930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the onvisible
event handler to Element
#2911
Conversation
This example is based on https://codepen.io/ryanfinni/pen/VwZeGxN
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! I had a few questions about some APIs, otherwise the implementation looks good
In the next version of Dioxus we're going to clean up our NodeRef implementation, so for now, I simply removed it from this PR. Once we add it in, all events should benefit from .target() working as expected. Otherwise, this looks good, and once checks pass, I'll merge it! |
This PR add the capability to handle the visible events for a given
Element
:For now, the IntersectionObserverEntry.target is not used/serialized. If it make sense to use it, how can we serialize it? Could we use the
data-dioxus-id
?