demo · v142

interestfor

Hover or keyboard-focus the buttons. The left one wires up a popover by hand with JS; the right one uses interestfor — zero JS, same behaviour, plus dismiss-on-leave handled by the browser.

manual · hover handlers

How you wired this up before Chrome 142.

declarative · interestfor

Same UX, no JS, automatic dismiss.

Paula Kinlan
Software engineer at Example Inc. 1.2k followers.
interestfor attribute supported
events fired (right-hand button)

relevant API

<button interestfor="auto-tip">Profile link</button>
<div id="auto-tip" popover="hint">Paula Kinlan…</div>
// Browser handles hover, focus, long-press, and dismissal.

see also