Primitives / DOM

visibleLinks: reading what is on screen

Opt-in: nothing preloads by visibility unless the application merges this stream into Site.routing's preload.links. It emits the address of each same-origin link that scrolls into view, once per page, and at most atMost (default 8) addresses per page, so a page of 50 links starts at most that many reads. A page is the pathname and query the document shows when a link is read, so a same-document navigation counts the cap again. margin is an IntersectionObserver rootMargin ('200px' reads links a little before they show). It reads nothing under Save-Data, on a 2g connection or while the tab is hidden, and a link that came into view then is not read later unless it leaves and returns. Without a document or an IntersectionObserver it is empty. Intent is not held back by Save-Data: the reader asked for that page.

ts
links: Stream.merge(pointedLinks({ rest: '100 millis' }), visibleLinks({ atMost: 8 })),

Failure

A missing capability yields the failure Message, never a throw. A Mount reads its args once, on insert; key the element by what the args depend on.