Movatterモバイル変換


[0]ホーム

URL:


Skip to content
Experimental WebAPI
GitHub

IntersectionObserverAPI

Types

intersectionObserver

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.See IntersectionObserver on MDN

typeintersectionObserver= {
root:root,
rootMargin:string,
thresholds:array<float>,
}

Record fields

rootMargin
string
thresholds
array< float >

Module

There are methods and helpers defined in IntersectionObserver.

intersectionObserverCallback

typeintersectionObserverCallback= (
array<intersectionObserverEntry>,
intersectionObserver,
)=>unit

intersectionObserverEntry

This Intersection Observer API interface describes the intersection between the target element and its root container at a specific moment of transition.See IntersectionObserverEntry on MDN

typeintersectionObserverEntry= {
time:float,
rootBounds:Null.t<WebAPI.DOMAPI.domRectReadOnly>,
boundingClientRect:WebAPI.DOMAPI.domRectReadOnly,
intersectionRect:WebAPI.DOMAPI.domRectReadOnly,
isIntersecting:bool,
intersectionRatio:float,
target:WebAPI.DOMAPI.element,
}

Record fields

isIntersecting
bool
intersectionRatio
float

intersectionObserverInit

typeintersectionObserverInit= {
mutableroot?:root,
mutablerootMargin?:string,
mutablethreshold?:array<float>,
}

Record fields

root
option<root >
rootMargin
option< string >
threshold
option< array< float > >

root

typeroot

[8]ページ先頭

©2009-2025 Movatter.jp