1 · pointer hover
Pointer-driven hover.
Delay ~500ms by default.
Delay ~500ms by default.
demo · v133
interestfor is more than “hover to reveal”. Tab to the trigger with the keyboard or long-press it on touch — both surface the popover. The event log shows the three trigger paths the UA collapses into the same outcome.
(hover: hover).activity log appears here
Before interestfor, a hovercard required: a mouseenter/mouseleave pair, a focusin/focusout pair (else keyboards couldn't see it), a touch pointerdown+setTimeout for long-press, and a body click to dismiss. Plus matching ARIA wiring. The browser already knows how to express “the user is interested in this element” through the UA's input pipeline — interestfor taps directly into that and emits two events: interest and loseinterest.
el.addEventListener("interest", () => track("showed-interest"));
el.addEventListener("loseinterest", () => track("lost-interest"));