Skip to content
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

Implement IntersectionObserver #219

Open
malchata opened this issue Nov 5, 2017 · 1 comment
Open

Implement IntersectionObserver #219

malchata opened this issue Nov 5, 2017 · 1 comment

Comments

@malchata
Copy link

malchata commented Nov 5, 2017

Using code that binds scroll/resize events to check element visibility in the viewport are incredibly expensive, even if the code that is ran inside of them is throttled. This project should consider using IntersectionObserver to check for element visibility. It's a far more efficient and performant solution.

That said, not every browser out there supports IntersectionObserver, but writing logic that checks for it and falling back to traditional means is possible. There's also an IntersectionObserver polyfill as well.

@vcarl
Copy link
Contributor

vcarl commented Feb 21, 2018

I agree with you, but as you note IntersectionObserver has poor browser support. Do you have any recommendations for only including the polyfill if the consumer doesn't already supply it? I'd like to avoid including redundant code if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants