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

IntersectionObserver #14

Open
thesnups opened this issue Nov 14, 2017 · 3 comments
Open

IntersectionObserver #14

thesnups opened this issue Nov 14, 2017 · 3 comments

Comments

@thesnups
Copy link

Why not feature check for IntersectionObserver support and use it when available?

@N1kto
Copy link

N1kto commented Nov 15, 2017

IMHO this lib is kind of alternative to IntersectionObserver, so there is not much sense using the latter inside the lib.
The value of this lib is that it serves same purposes as IntersectionObserver while grounding on very basic browser API and thus having much broader browser support.

I think it's up to consumer (you) to decide whether to use IntersectionObserver when it's available or this lib :)

@mjsisley
Copy link

mjsisley commented Nov 19, 2017

As a counterpoint @N1kto, if this library feature checked IntersectionObserver and used it when available, you would get the assumed performance improvements of that API when available... but also achieve broader browser support by falling back to the methods currently in use here.

It is a further benefit to the consumer to not have to have multiple implementations within the codebase.

@thesnups
Copy link
Author

I agree with @mjsisley. As a programmer I'd like to be able to code again a consistent API (e.g. the emergence.js API) whilst knowing that the performance benefits of IntersectionObserver are being leveraged when they are available.

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

No branches or pull requests

3 participants