-
Notifications
You must be signed in to change notification settings - Fork 8
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
support dynamically changing the rootMargin #12
Conversation
What's your use case? Can you provide some code? |
Scenario:
|
And why not use the |
Using |
I'll take another look at this – I agree that updating the root margin can be a common enough use case. |
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.
Thank you for keeping this up to date. Tested locally and it works great.
Published to NPM in version 0.7.0 |
I need to use it with JavaScript. can you help me please for convert this code JS syntax? |
Allows for updating
rootMargin
after init to accommodate scrolling, zooming, network, etc. changes.There's a discussion happening around this currently with the W3C IO Spec. It sounds like it will eventually be supported, but is not something currently provided.
w3c/IntersectionObserver#428
Thoughts?