A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://Tarektouati.github.io/vue-use-web/functions/intersection-observer.html below:

Website Navigation


Intersection Observer | useWeb

# Intersection Observer

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.

# State

The useIntersectionObserver function exposes the following reactive state:

State Type Description isIntersecting Boolean If the element or a part of it is in the view port. isFullyInView Boolean If the element is fully contained within the viewport. intersectionRatio Number A number between 0 and 1 representing how much of the element is in the viewport. # Methods

The useIntersectionObserver function exposes the following methods to give you fine control over the observation state:

Signature Description observe(void) Starts/Resumes observing the element. unobserve(void) Stops/Pauses observing the element. # Config

useIntersectionObserver function takes a required parameter that is a ref to the observed element and optional config .

# Example

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4