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

Use IntersectionObserver when available #1

Open
pocketjoso opened this issue Aug 11, 2017 · 0 comments
Open

Use IntersectionObserver when available #1

pocketjoso opened this issue Aug 11, 2017 · 0 comments

Comments

@pocketjoso
Copy link
Contributor

Eventually we should be able to replace the window scroll listener with Intersection Observer API usage:
https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API

However note that it's not very likely that this would have any impact at all on performance, as the bottle neck for this component is the number of re-paints of the color background element that we perform.

Also note that the Intersection Observer API is currently not yet supported in safari, so would need to keep current scroll listener logic as fallback.

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

1 participant