Primitives / Observers
foldkit-primitives/observers
Element-scoped observation as Mounts: attach one in a view with h.OnMount
on the element it watches. The element owns what is observed; the Mount
reports it as Messages while the element is live and disconnects on unmount.
There is no ref to thread, because a Mount receives its element.
(source)
| Name | Reports |
|---|---|
Resize() | Resized { width, height }, the content box |
Intersection() | IntersectionChanged { isIntersecting, ratio }, on viewport crossings |
Mutation() | Mutated { type, added, removed, attribute }, across the subtree |
Bounds() | Measured { x, y, width, height }, the current rect first |