web-api-intersection-observer
Reactive icon

Web API Intersection Observer

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 08 August 2024
 by 
0.0
 (0 ratings)
web-api-intersection-observer

Web API Intersection Observer

Details
The Intersection Observer API provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top-level document's viewport.
Read more

Historically, detecting visibility of an element, or the relative visibility of two elements in relation to each other, has been a difficult task for which solutions have been unreliable and prone to causing the browser and the sites the user is accessing to become sluggish. As the web has matured, the need for this kind of information has grown. Intersection information is needed for many reasons, such as:

  • 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.
Release notes (1.0.0)

New functionalities:

  • Created LazyLoad widget, that uses the observer to lazy load content in a placeholder and then destroys the observer.
  • Created global public actions to expose the API's functionalities from the widget's Id:
    • Observe
    • Unobserve
    • Disconnect
    • TakeRecords


Breaking changes:

  • Input parameters changed from *Element to *WidgetId so that OutSystems' Service Studio suggest named widgets.


Corrections:

  • Created the OnDestroy event handler, to correctly destroy the observer.


Other changes:

  • Improved descriptions of the component.
  • Removed unused dependencies.
License (1.0.0)
Reviews (0)
Team
Other assets in this category