Skip to main content

Module observers

Module observers 

Source

Functions§

build_mut_records_for 🔒
drain_mut_records 🔒
fire_intersection_observers
IntersectionObserver コールバックを全要素 isIntersecting=true で発火(将来用の外部フック)。
flush_mutation_observers
DOM 変更後に MutationObserver のコールバックを発火する。 eval 末尾と dispatch_event 後に呼ぶ。
intersection_observer_ctor 🔒
new IntersectionObserver(cb, options)の第2引数optionsroot/rootMargin/threshold)が丸ごと無視されており、対応する .root/.rootMargin/.thresholds読み取り専用プロパティも存在しな かった(丸ごと未対応だった。2026-07-17 発見)。実際の交差判定は 「observe時点で常に完全交差」という既存の簡略実装のままだが(root/ thresholdに応じた複数回発火は対象外)、構築時に渡された値を正しく 読み取り専用プロパティとして反映するだけでも、既存コードの if (observer.rootMargin !== '10px') {...}等のフィーチャー検出 イディオムには対応できる。
io_disconnect 🔒
io_observe 🔒
io_take_records 🔒
io_unobserve 🔒
make_io_entry 🔒
IntersectionObserverEntry を構築する。isIntersecting/ intersectionRatio は常に「完全に交差している」固定値の簡略実装 だったが、boundingClientRect/intersectionRect/rootBounds/time が丸ごと未対応だった。boundingClientRect/intersectionRect は 既存の dom_get_bounding_client_rect と同じ実座標を再利用し(常に 完全交差扱いのため両者は同じ矩形になる)、rootBounds は監視対象の ルート(document全体扱い)を表現する実座標が無いため nulltimeperformance.now() と同じ単調増加タイムスタンプを使う。
make_mut_record 🔒
make_resolved_promise
即時 fulfilled な Promise オブジェクトを返す(animate().finished など用)。
mo_disconnect 🔒
mo_observe 🔒
mo_take_records 🔒
mutation_observer_ctor 🔒
resize_observer_ctor 🔒
ro_disconnect 🔒
ro_observe 🔒
ro_unobserve 🔒