Skip to main content

make_io_entry

Function make_io_entry 

Source
pub(crate) fn make_io_entry(it: &mut Interp, target: Value) -> Value
Expand description

IntersectionObserverEntry を構築する。isIntersecting/ intersectionRatio は常に「完全に交差している」固定値の簡略実装 だったが、boundingClientRect/intersectionRect/rootBounds/time が丸ごと未対応だった。boundingClientRect/intersectionRect は 既存の dom_get_bounding_client_rect と同じ実座標を再利用し(常に 完全交差扱いのため両者は同じ矩形になる)、rootBounds は監視対象の ルート(document全体扱い)を表現する実座標が無いため nulltimeperformance.now() と同じ単調増加タイムスタンプを使う。