Intersection Observer API
El Intersection Observer API permite detectar los cambios en la visualización de los elementos de una página web. Con esta interfaz se pueden implementar muchas cosas que antes era muy complicado de lograr:
- Lazy-loading of images or other content as a page is scrolled.
- Implementing “infinite scrolling” web sites, where more and more content is loaded and rendered as you scroll, so that the user doesn’t have to flip through pages.
- Reporting of visibility of advertisements in order to calculate ad revenues.
- Deciding whether or not to perform tasks or animation processes based on whether or not the user will see the result.
Deja un comentario