joshwnj/react-visibility-sensor

Evaluate IntersectionObserver support

Open

#56 aberto em 16 de dez. de 2016

Ver no GitHub
 (3 comments) (0 reactions) (0 assignees)JavaScript (198 forks)batch import
enhancementhelp wanted

Métricas do repositório

Stars
 (2.300 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

Suggested by @Andarist in https://github.com/joshwnj/react-visibility-sensor/pull/54#issuecomment-267279074

What would you say about implementing IntersectionObserver support? It could even be the default with scroll and interval being used only as a fallback settings. Its already implemented in 2 browsers.

https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API

It would be cool to try this, and compare to the current approach. We can try the polyfill for browsers that don't support it yet:

https://github.com/WICG/IntersectionObserver/tree/gh-pages/polyfill

http://caniuse.com/#search=Intersection

Guia do colaborador