Expand description
Intersection Observer 幾何交差計算モジュール (W3C Intersection Observer Level 2)
ビューポートまたはルート要素に対するターゲット要素の交差判定、
rootMargin(px / %)の適用、交差面積比率(intersectionRatio)、
およびしきい値(thresholds)に基づくコールバック発火判定を提供する。
Structs§
- Intersection
Rect - 幾何矩形 (x, y, width, height)
- Intersection
State - 交差判定結果
- Margin
Value - マージン値 (px または %)
- Root
Margin rootMargin定義 (top, right, bottom, left)
Functions§
- compute_
intersection - W3C Intersection Observer §3.2 アルゴリズムに基づく交差計算
- should_
trigger_ callback - しきい値(thresholds)遷移判定 前回比率と今回比率の間で thresholds のいずれかを跨いだか、または初回かを判定